Car is jerking when going up hills and accelerating?

I just bought the vehicle so I am not sure if the spark plugs have been changed or if there has been a change in mileage. It is an automatic.