Here are the steps to replace a deadbolt lock:
1. Position a paper template on the door edge and mark the center holes on the face and edge of the door.
2. Drill a face hole using a hole saw and an edge hole using a spade bit. Drill from both sides to prevent splintering.
3. Insert the deadbolt into the edge hole and mark its outline. Chisel out a mortise for the deadbolt.
4. Screw the deadbolt to the edge of the door and attach the faceplate with screws.
5. Retract the deadbolt and install the thumb turn assembly. If your deadbolt has a keypad, install it following the manufacturer’s instructions.
Here is a link to a detailed tutorial on how to install a deadbolt step-by-step from This Old House . You can also check out this article from Lowe's which provides more information on how to remove an existing deadbolt.