You will want to pull your car over to the safest level spot you can find. Check your spare to make sure it is inflated before spending all that energy jacking up the car. Refer to your owner's manual for specifics and tips to guide you through.
Basics : Set Parking brake. Loosen the lug nuts on the flat tire mounted on the car. Jack the car up, remove the lug nuts and flat tire. Install spare tire and lug nuts. Lower car and tighten lug nuts.