Read IRC sec. 3121(b) for exclusions. If you for in one of the categories, you might not have to pay social security tax and medicare tax. In general H1B need pay all tax, See IRC sec. 3121(b)(19) for visas that exluded for FICA.
http://www.taxalmanac.org/index.php/Internal_Revenue_Code:Sec._3121._Definitions