Replacing your grip is quite straight forward! Grips normally come with a tapered end and a flat end. Start with the tapered end at the bottom and start winding up, it is up to you if you want the grip slightly overlapping (to form a ridge) or if you want it edge to edge (smooth feel).
When reaching the top of the grip to finish it off neatly, just taper the grip as it started then add the racket tape (included when buying the grip) to hide and tidy up the top of the grip.
WHEN TO REPLACE YOUR GRIP
When your grip is wearing it is recommended to change your grip to keep the feel and cushioning as it should be! This will help you keep the racket in your hand and also cushion the arm and elbow from racket vibration.