The rail has 2 hoses on either side of the back of it for supply/return. Those can be disconnected. Then there are 4 (IIRC) bolts that bolt into the top of the IM, either 10 or 12mm. The o-rings hold the fuel injectors, and subsequently the rail, firmly in place. When you pull on the rail, suction is created, so it makes it all the worse. A slow, even, steady pressure works best. Also, to minimize fuel spillage, I always open the gas release cap. Have some towels handy, as when you remove the lines, fuel is going to spill.
When you put the fuel rail back on, make sure you lube the injector o-rings (I used spray silicone), otherwise they'll rip. Ask me how I know*lol*. Autozone sells a gasket package that contains them all for ~$10.