Above advice is good. I would add that if you're doing this under the car it can be pretty frustrating and tight and you may have to try more than once, especially if the previous owner did not get the pump itself seated right in the tank. It takes a bit of luck and sometimes a few tries to get it in right. It's much much easier with the tank on the ground. If you don't have brass or hardwood for a punch, aluminum works too.
It can be difficult to get all three tabs of the locking ring to engage at once. Make sure they're all in before you finish tightening the ring, or you'll have to do it over again. The tabs have a slight bevel on them, and it can help to clean that bevel up and sharpen it a bit with a file. This is especially true if the replacement tank came with a replacement ring, and if that new ring is Chinese! Sharpen it and save yourself a few dozen retries. When you're using a new O-ring, as you should, it's a very tight fit, and you'll wish you had three hands.
Once you have all three tabs of the locking ring engaged, make sure you turn it all the way to the stops.
Oh, and don't try to do this job with very much gas in the tank. It is possible to do with some gas in, but the less the better, not only for mess and fumes, but because it's easier to get the sending unit seated without fighting buoyancy. Run it as close to empty as you dare before doing the job.