As a F-1 visa holder, you are
considered as "exempt" meaning not counting days for five years
starting from the date of your first arrival in the United States. After
the five years period, you will start counting days by using the Substantial Presence Test to see if you qualify to be
treated as a US resident for tax purposes. If you are within the five years period of time frame, you are not entitled to pay any FICA taxes. You will need to file a Form 843 to claim the withholding back. However, if you are on F-1 visa including OPT for more than 5 calendar years, you are not exempt from FICA taxes.
https://www.irs.gov/uac/form-843-claim-for-refund-and-request-for-abatement