The symptoms you describe could be caused by a multitude of different problems. Modern automobiles engines are extremely complex, however you can eliminate some things right off the bat.
If your Malfunction Indication Lamp, or "Check Engine Light" is on, you may be able to take the vehicle to an auto parts store and ask to have your OBDII (On Board Diagnostics) codes read.
As your car runs the engine control unit monitors performance and emissions and constantly adjusts to give optimum performance, if something goes wrong it will light up the check engine light and store the code. It is a great place to start, and usually costs nothing.