This also depends on the VW model you have, but should follow a similar pattern.
- Use the metal button above the key to remove the key from the fob.
- Use a small screwdriver to slide into the little slot the key fits into and open the fob.
- Gently remove the green circuit board.
- Take out the battery and replace with the proper battery.
- Put the fob back together and reinsert the key.