First, a quick note on technique - start with a coarse grade sandpaper on the floor sander and work down to the the finer grade.
The coarse grade removes the old finish and levels out the imperfections, then the fine grade makes it nice and smooth. If you go the other way around, you'll definitely curse every time you see the grooves in the sunlight. Fixing this means stripping off the nice new finish, not fun.
In passing, an obvious-in-hindsight but sometimes-missed point is to go with the grain, i.e. sand along the boards, not across them. In any case your sander will complain bitterly if you don't.
Also, give the boards an incredibly good wash before you start with e.g. Sugar Soap - you want to try and strip off everything gungy to stop the sandpaper clogging too often. Leave for at least 24 hours to dry nicely.
Be sure to hire an "edge sander" too, this will help you get to the edges that a drum sander won't get to. If you can, remove the skirting boards (baseboards) as then you can get right underneath; only do this if you know you're redecorating the walls too and don't mind patching up the woodwork. You'll inevitably end up doing the fiddly bits around the door frame and right in the corners yourself by hand with a scraper or sandpaper, which takes longer than you could possibly imagine.
While doing the sanding, remove everything from the room (obviously) and get heavyweight dust sheets to tape around the door. Wear airtight goggles as this is an insanely dusty process. You'll also need ear defenders as this is an insanely loud process too.
Regarding stain, it's a matter of personal preference. I've done both and prefer the more uniform result that stain gives.
Regarding finish, I've used both oil-based and water-based finishes. Both are OK, but the oil-based one looked richer (can't say why, can't say how) -- and took about three days to dry. Somewhat inconvenient for a hall, and our puppy left nice pawprints.
Follow the instructions on the tin; in general thinning probably isn't worth it, as you'll find the second and subsequent coats will go further anyway. I applied three coats of the oil-based finish, and five of the water-based finish, but this depends on the state of your boards. It's handy to rent good bright work lights so you can see where you've been, especially for the second and subsequent coats.
What is important is that you get flooring-grade varnish, regular varnish won't stand up to the first party, and yacht varnish will cost so much you won't have the first party...
Best Answer
Ummm. Primer might be the least of your concerns. I have flipped a few houses in my life and many have had heavy smokers and/or animals. If you remove all soft surfaces - carpet, curtains, anything that can retain the smoke smell - then you can try to prime it if the odor isn't insane. So after everything is out let it air out a day or two or longer.
If the smell is coming from the walls then you can try to prime and paint but it might be a total waste of time and money. I have had to redrywall the living room areas of more than a few homes. There is a good chance the insulation is soaked with the smoke smell too so that may need to be replaced - and another reason why painting hardly ever helps the extreme cases.