If you want to do compression testing, glow plug replacement, etc., the glow plugs need to come out. If you think that you need new glow plugs, first check the wiring as faulty or corroded wiring may cause a misdiagnosis. Glow plug relay is a common misdiagnosis, while you you should still check the glow plug relay, get the car scanned for codes first. One trick is to unplug the coolant temperature sensor coming off the cylinder head coolant flange to trick the computer into thinking it's cold and turning on the glow plugs to their maximum glow duration.
The glow plugs are only used before engine start when it's cold. They are on after every engine start to help emissions and smooth running until around 2500 rpm.
Glow plugs are not a "it works or it doesn't" item. As glow plugs age and are used, they become weaker and could contribute to a hard start condition. You can extend the glow plug duration through a VCDS cable. Manual transmission cars use 3 coolant glow plugs in the coolant flange out of the head for faster engine warm-up, they are not the same as the engine glow plugs. In an automatic transmission car, the ATF fluid cooler accomplishes this so there are no coolant glow plugs.
2004-2006 TDI use ceramic glow plugs and light up faster but are more fragile. The Bosch ceramic glow plugs were replaced with steel plugs under an emissions recall but caused cold starting problems. At the end of 2010 VW extended the warranty on vehicles that had the recall done and reflashed these cars and replaced the Bosch with NGK ceramic glow plugs. They cannot be swapped with steel without a computer change because of differnet voltages and duration. See 1000q: cold start PD engines due to glow plugs for more details on this.
2009 and 2010 TDI use pressure sensing glow plugs in their common rail engine and it's not a simple remove-replace.
TDI up to about 2002 sense all glow plugs as 1 unit because of the wiring harness. TDI after about 2002 can sense each glow plug separately on the harness. The glow plugs are numbered opposite the engine cylinders. #1 cylinder has #4 glow plug. #2 cylinder has #3 glow plug, etc. From what I've heard, this is because of a European wiring standard where #1 glow plug (which happens to be cylinder #4) is closest to the 12v feed wire.
Don't mix/match brands of glow plugs. Buy all bosch or all beru glow plugs. Below is a .pdf file with some technical info on glow plugs.
Remove the engine cover (3x 10mm nuts). Then remove the glow plug wires. Gently wiggle and pry them straight out. If you must, you can remove a fuel injector hard line to get more clearance. Just be prepared to catch any leaked fuel with a towel. Make sure there is plenty of ventilation, no source of ignition or spark nearby, and that fuel vapors are fully evacuated before working on the car.
If you're not sure which are the glow plugs, here is a picture
with the glow plug wire harness removed and #4 and #3 glow plug. They are
numbered opposite the engine cylinders because of how far each one is from the bus.
Before you remove the glow plugs, clean the area around the glow plugs. Use carb/brake cleaner and lightly spray/wipe the area around the plug. Then use compressed air to blow out the area. Make sure you are wearing safety goggles because compressed air will send dirt into the air. If there's a lot of corrosion, spray a drop of PB blaster around the threads and let soak. This will loosen the threads and make it easier to remove. Wipe away any excess penetrating lubricant.
Use a deep 10mm socket and universal joints to remove the glow plugs or VW special tool 3220.
Warning: the glow plugs can break off if they are over torqued during installation or removal! They could break at as low as 26 ft-lb which isn't a lot so if they're too tight, let the engine warm up a little and use more penetrating lubricant.
Put a tiny dab of antiseize around the glow plug threads and replace. Less is better, too much can get squished into the cylinder. Wd-40 or other lubricants are not a substitute for anti-seize.
Beware of parallax, a viewing error, when rethreading the glow plugs! Please read 1000q: mechanics tips and garage organization for more information on this. The glow plug threads are not perpendicular to the head! Each is at a slightly different angle. If the threads don't go in smoothly for at least a few turns, you may be stripping the threads. One trick is to turn the plug counterclockwise for a complete turn to feel the threads, then turn clockwise to tighten once you've engaged the threads. The head is aluminum, so don't over torque it! Torque to only 10-12 ft lbs.
Here are some TDI glow plugs after removal. The black and white coloration on the tip is normal.
Glow plugs reinstalled with a new wiring harness. The glow plugs are connected by a black wiring harness, the injectors are the ones with a metal hard line at the top and a black fuel return line below it.