Retirement tax questions

Generally speaking, J1 scholars are exempt from SS tax and are considered non-US residents for tax purposes for the first 5 years of their visa, so long as they are performing work (teaching, research, etc.) that is approved for their visa status.  If a J-1 scholar takes a job that is not related to their visa, they are subject to SS tax withholding.