PICK THE RIGHT PAINT
The paint you put on the flooring needs to be hardy, it needs to protect the wood as well as change the color. Your standard wall and ceiling paint isn't going to cut it (yes, no judgment, that is what I first used on my floorboards). Some brands do make floor-specific paint now that's extra durable and resistant to stains and scratches. Ideally, you want it to be water-resistant too so you can mop up any potential spills. For super hardwearing paint, you could look to use outdoor paints made for porches or fences.
CARRY OUT THE NECESSARY THE PREP
Checking and improving the conditions of your floorboards is the first step. Fill in any obvious holes and deep scratches with wood filler, and repair or replace any boards that are really damaged. Then sand down your boards. A hand electric hand sander works fine for smaller rooms, but if you are dealing with a large room I would recommend renting a larger sander or hiring someone to come and do this step for you.
CONSIDER THAT IT MIGHT LET IN A DRAFT
Something else I didn't consider. There are gaps between floorboards, and gaps mean drafts. If you live in a warmer climate or can deal with the potential drafts that wooden floors might create then fine, you can skip this step.
But if drafts, or even noise, are going to be an issue, prep now and thank yourself later. Seal the gaps between the floorboards using a specialized floorboard gap filler (it comes in strips and is super easy to use) or wood filler.
CHOOSE A PRACTICAL COLOR FOR YOUR HOME
The color you choose with determine how high maintenance this project will be, so do consider the practicalities. With high-traffic spaces like entryways and kitchens don't go too light with the color. You want to disguise the wear and tear these floors will inevitably go through.
BE PREPARED TO HAVE TO TO PAINT YOUR FLOORING AGAIN
I think this is actually a reason to paint your wooden floorboards. Unlike with carpet or even tile, if something gets spilled, or dirt starts to build or scratches start to show, you can just give it a fresh coat of paint. But it is something to be aware of if you are considering painting your floorboards, you will need to re-paint every now and then depending on the room and the color.