It only takes a slightly larger generator to run a typical deep well water pump. A 5KW will easily do the job.
The correct way is to install a transfer switch (Expensive) Or the quick and dirty way is to shut off the main breaker,
Put a piece of tape over the main breaker so there is NO CHANCE anyone can flip it back on, And just backfeed the whole house with your generator. (Shut off most non needed breakers like to an electric range, Water heater, etc.)
Many places have a 240 volt circuit in a garage to run air compressor, Arc welder etc that work well to plug the generator in to. Again, If attempting this method, MAKE SURE THE MAIN BREAKER IS OFF, Taped to the off position, And marked to leave off for the duration. This method is not for everyone. If you can't chew gum and walk at the same time type folks should not consider doing it this way.
Exactly the way I use to power my house in a storm. My shop is in the basement next to my driveway, and the garage is about fifteen feet away, where the 5000 watt generator is built in. I've built a small access door for power cords and air lines into a window in the shop so I can work outside--I use that to feed the generator connector cord into the house.
Using a thirty foot length of 3 conductor eight gauge cord with 240 volt twist lock plugs at both ends, I backfeed my house through the compressor outlet in my shop. When power goes out, it takes me about ten minutes to set up and get the generator running.