Question: how do you get a social security tax refund?
Answer: Ask your employer to refund the erroneously withheld FICA taxes and if a W-2 was already issued, to give you a corrected Form W-2c for that year.
If your employer refuses to refund the taxes, you can file Form 843 (for instructions see here) and the IRS will refund the money to you.