Assuming it's the same as my 535i....
Get the rear up in the air and craw under the car. Behind the right rear wheel about 1/2 way to the center of the car is a 4" long by ~3" diameter canister. Pinch the rubber intake line with a clamp. It's the inboard line that attached to a metal line coming out of the fuel tank...the outlet line is closer to the wheel and heads to the front of the car.
Remove hose clamps (6 or 7mm nuts on those, or screwdriver), then the hoses (twist to break 'em free) and keep your head out of the way because it'll spurt fuel under pressure. I'd wear goggles if I were you. Last time I did this, I wore a face respirator with charcoal filters because the fumes under there get really unpleasant.
Undo the 10mm bolt holding it to the car. Put the rubber sleeve and metal bracket on the new filter and reinstall (make sure the flow direction marked on the filter lines up with how fuel will be flowing.