Loosen the caulk between the vanity and the wall with a utility knife. On the sides, go all the way down to the floor as necessary to remove all caulk.
Remove the countertop very carefully to avoid wall damage. For large countertops and vanities, having another person available makes the job easier.
Loosen and remove the screws that attach the vanity to the wall. If available, a cordless screwdriver makes this step easier. To avoid stripping the screws, apply firm pressure with the driver and ensure it's in line with the screw and not tipped.
Locate the wall studs and mark them a little higher than the top of the new vanity. Mark the placement of the new vanity's screw holes.
Set the vanity in place. It's very important that the vanity is flush against the wall. Use shims and a carpenter's level to do this.
If desired, install a new faucet as per the manufacturer's instructions. It will change the look of the room and make the job go faster in the long run to do this while the vanity top is separated from the vanity. Less time crouched awkwardly under the sink is always helpful.