Remove the old vanity.
Shut off the water supply and disconnect the drain lines. You may need to use a crowbar to separate the vanity cabinet from the wall, so be careful not to damage the sheet rock. If you plan to reuse the sink and countertop, remove them from the cabinet and store them safely.
Prepare the area.
Use a stud finder to locate the studs in the area behind where the vanity will go. Mark the location of each stud with a pencil.
Set the bathroom vanity.
Place your new vanity in the space and use the level to determine if the piece is level from front to back and side to side. Use shims to shore up sides that sit lower than others, and trim the shims with a utility knife to be flush with the front of the vanity. You may also want to paint or stain the shims to match the cabinet.
Secure the cabinet.
Drill screws through the top rail alongside the back of the cabinet to attach it securely to the wall studs. This will prevent the vanity from rocking or tipping.
Top it off.
Place the countertop on the cabinet and screw the countertop to the cabinet on the underside of the counter. Place the sink in the sink hole, and caulk around the edges to hold it in place. The sink may also have sink clamps that need to be attached on the underside.
Hook up the plumbing.
Reconnect the water supply and drain lines and turn the water back on. Watch carefully for drips or leaks that may need to be sealed.