The article below has step-by-step instructions. It's a pretty easy procedure. Make sure you tap the black plastic retainer ring counter-clockwise rather than trying to pry it up. Replacing the fuel filter at the same time as the pump is recommended.
http://www.pelicanparts.com/bmw/tech...-Fuel-Pump.htm