How should I install a bathroom exhaust fan in a 2nd floor bathroom?
You can either vent straight out or through your roof.  I don't know exactly what is above your fan but I will assume it is finished space and you are venting through the side.

In order (and note giving advice without pictures):


Figure out which way the joists are running above the bathroom.  You will be venting out which ever way you can run parallel to the joists.
You will want your fan somewhere in between the shower and the center of the room.  Traditionally the fan placement is about 1-2 feet outside of the shower area.  I am not sure what other things are in your bathroom but figure out where you want the fan.
Use a stud finder (I like the magnetic ones) to figure out where the joists are.  Cut out test hole to inspect and eventually cut out a square of drywall big enough to install the fan in between the joists.  Not trying to be a downer here but this is a bit of luck.  You don't know what is in the ceiling.  If there is some plumbing, major electric or ducts, you might have to make several cuts.
Once you have your fan placement (you have looked up into the joists knowing that you can run a 4 inch pipe to exterior) you can start removing more drywall.  You will need to remove a strip of drywall (at the joists) from fan to exterior wall, a small strip (foot wide) from fan to electric wall, and then another strip around your current light switch.  To give exacts we will need to see pictures.  
Figure out what circuit you are tapping into and what it is rated for.  If it is 15A then you can use 14-3 wire and 20A you must use 12-3 wire.
Install fan in ceiling.
Run electric from switch to fan.  (Turn off electrical source first)
Wire fan.  
Wire switch.  (I am assuming you will have to replace electrical box for something bigger so you would be in essence rewiring everything there - take a picture before you tear it apart)
Cut hole for exterior venting.
Run duct from fan to exterior - it should be sloped very slight down.
Cap exterior venting on outside with appropriate cap.
Insulate around venting and exterior wall.
Drywall, mud/tape, paint.  Really every other step could be done in a couple hours given you have the materials.  This is really the most time consuming part.


Let me know if you have questions or if I skipped something.