Here's the part some customers don't expect. You tear out the carpet to install Laminate, Hardwood or Vinyl plank only to learn that the condition of your current wood sub-floor isn't up to standards.
Quick example, For glue down vinyl plank, the sub-floor doesn't need to be necessarily leveled (although expect to see some telegraphing), but does need to have a smooth surface in order for glue to bond properly.
For floating floors (laminate, engineered hardwood), leveling can be an issue. Options can be sanding down the high spots, fixing the joist or re-sheeting with a minimum 5'8" thick 4 x 8 plywood sheet with the possibility of having to pour a bag or two of self leveling.
For Nail down (engineered or solid hardwood), the sub-floor needs to be leveled as well (although if you are on a budget, and the leveling is tolerable, having the floor nailed down will help but might show humps & dips in rooms with a lot of natural light.
The proper way is addressing the leveling issues professionally.