You pay your Medicare and social security taxes the same way you pay your income taxes.
You can pay them when you file your income tax return if you expect to owe less than $1,000 in total taxes.
You will need to make estimated tax payments if you expect to owe $1,000 or more in total taxes. These payments are made quarterly using Form 1040-ES
(PDF), Estimated Tax for Individuals. You will need to figure these taxes at the beginning of the year.