There are just too many possibilities to guess, based on a one-sentence description. You didn't even say what year, which motor, how many miles, etc. Do you have any way to post a video of the problem? Are you used to doing any sort of mechanical work yourself?
If you don't already do most of your own basic maintenance (oil changes, engine/cabin air filter changes, brake pads, tire rotations, etc) and if you don't own more than a $19.99 tool kit from WalMart, then in all honesty I'd suggest you bring it to a reputable mechanic or dealership service department. Maybe it is something simple, and maybe its not, but the newest versions of these cars are quite complicated and you don't want to risk your large investment.
Other than popping the hood and looking for something that is obviously loose, or checking the air filter to make sure its not just a bunch of acorns rattling around in the airbox, most likely it will need to be looked at by a mechanic.
A forum community dedicated to Jeep Compass SUV owners and enthusiasts. Come join the discussion about performance, trail riding, parts, classifieds, modifications, troubleshooting, maintenance, and more!