My car hesitates when I try to accelerate

I get enough power to the wheels to move forward a few inches before stopping, then it will do it again. From the outside I bet it appears as if I’m hitting the gas and then the brake a few times before driving. It also feels that way.