Go to the fusebox and turn off all power to the bathroom.
Set an old towel under the existing fan to catch debris. Remove the ceiling vent to the fan by unscrewing it or unclipping it.
Go to the attic above the bathroom. Disconnect the electrical wiring where it's connected from the house to the fan unit by unscrewing the wire nuts holding the two white and two black wires together and detaching the screw that holds the bare grounding wire to the unit. Hang the house wires over a rafter or other high object so you don't lose track of where they are.
Disconnect the exhaust hose from the unit by loosening the screw that holds the metal belt clamp around the hose. Leave the other end of the hose connected to the wall. Prop the hose up where you can see it and won't trip over it.
Remove the fan unit from the floor of the attic by unscrewing the brackets holding it to the joist and lifting straight up. Set it aside.
Set your new fan unit in place over the hole in the floor where the old one was. If the opening of the new unit is bigger than the opening of the old unit, mark around the opening with pencil while the new unit is sitting on it, then move the unit and widen the opening with your jigsaw.
Once the opening is correct and the fan unit is sitting in it, affix it to the joist using the provided brackets and screws. Reconnect the wiring the way it was before (white to white, black to black), using wire nuts and electrician's tape to seal the connections. Hook the bare copper grounding wire from the cable to the green grounding screw on the unit. Tighten the screw.
If the opening of the exhaust hose from the previous fan fits around the exhaust tube of the new fan, attach it there with the provided belt clamp and tightening screw. If it doesn't fit, then attach the hose that the new unit came with. Run the other end of the hose to the same wall where the old one is vented. Take the old one off by unscrewing the brackets holding it there. Put the new one in its place, attaching it to the wall with the provided screws.
Turn the power back on, put the new vent cover over the opening in the bathroom, and test the unit.