Whatever it is, that sounds like a slipping cluch which is the most common diagnosis of this symptom, but it could be lots of things since you didn't give us enough information about what's going on.
If you have a manual transmission: A slipping clutch is probably what you have. You press the gas, and the engine revvs high, but you arn't accelerating like you normally would. This is a bad thing and the clutch needs to be replaced otherwise it will just get worse untill you reach the point where the car WONT accelerate anymore. Clutches wear out, just like brake pads, rotors, and tires do.
Provide us with more info: Is your car automatic or manual? Does this occur when you are keeping a steady speed or just when you accelerate and put extra force on the drivetrain? Does this happen in any specific gear or does it happen to all of them?