I did a project like this all by myself ... First thing: GET HELP because it is not a quick or easy project. This does not have to be an all or nothing proposal. Some of the flooring might be OK to keep while other sections are probably history. You have to ask about your design motif such as wood halls and carpeted bedrooms ... or the other way around.
That being the case, you could replace missing wood by scavenging from areas you intend to carpet. This will require you to learn how to do hardwood floor repair. (The essential challenge to every DIYer) You would have to cut out some floor boards and re-set them in the damaged areas you want to refinish. The alternative is to locate a shop which has old flooring to match your width of hardwood. Once repaired, plan on hitting the floor with a drum sander, corner sander, belt sander ... a vacuum attachment is MANDATORY and so are ear muffs, goggles and a face mask with a breathing valve! (another tough job for a DIYer but you can do it). Don't kid yourself -- start with 36 grit ...
If you can, remove your base boards to facilitate getting close to the wall with your sanders.
The carpet bits and glue can be softened and scraped off using a spray bottle filled with acetone or lacquer thinner. Make sure the area is extremely well ventilated. Use a pole floor scraper, a mountain of paper towels, and dispose of the residue outside ASAP. Once that goo has hardened, you can sand and refinish.
Here is a newbie explaining his process:
These nice folks give you a good idea of the process:
And the next part is helpful too but the hand sander is a joke ... Go for the edge sander and belt sander (as the video eventually shows):