If you are an employee, you fill out a W-4 for your employer that lets them know how much tax to withhold from your paychecks. The employer withholds some of your pay and in January they give you a W-2 to use when you file your tax return -- to show the IRS how much you earned and how much tax you already had withheld. Depending on whether too much or too little was withheld you might get a refund or you might owe at tax time.
The employer will withhold for Social Security, Medicare, federal and maybe state tax if you are in a state with a state income tax.