For short periods of time, prescription medications (such as narcotic pain medications or muscle relaxants) may be helpful to alleviate pain or related complications.
It can take anywhere from 4-10 hrs. now if your head gasket is warped you will have to take it to have it milled that takes from 1 day to several days. if not you can just buy a completely new one that fits perfectly for about $150.
If you are talking head gasket the time depends on the car and mechanic that does the job. On average I would say with no problems the car can be fixed in 3-6 hrs, however, if you have a cracked head or other problems it could take longer.