Firstly, you should seriously consider replacing the whole housing (you can buy one with a pre-fitted new filter cartridge). Sub micron dirt particles will damage your diesel injectors. If you replace only the element, you need to clean everything around the filter housing extremely thoroughly and
be extremely careful not to introduce dirt.
Make a careful note of which pipes go where (or take a photo) and then remove them by disengaging their quick-release catches. They are all self sealing so you won't spill much diesel. Use poly bags and elastic bands to prevent dirt ingress into the pipes.
Now to the actual housing:
I'm 100% sure about this particular car, but there are two types of filter housing on the hdi. One is opened using a (17mm?) socket on the top of the housing. The other type is a more basic type which has a notched upper securing ring which (theoretically) just unscrews. The second type are often much too tight to unscrew by hand or even with a filter wrench. You could try hammering the notches round with a large wrench. Obviously it could break and you will wish you had just replaced the whole housing. Once you have removed it, fit the new cartridge (be prepared for it to be the wrong type) and re-assemble. No special priming is necessary, but you might want to turn the ignition on for a few seconds three or four times to allow fuel to fill the filter so you don't need to crank the engine excessively to start it.
Have a look at the fuel that came out of the housing. If there are shiny bits of metal in it, you might want to seek expert advice as this could mean expensive repairs are around the corner.
Good luck
alex, April 2007