Do you have a CEL (check engine light on)? Will it only happen hot, cold? At all rpms, only from a stop? How many miles? Last time you did a tune up? Any work done on the engine before the problem started? Is it a manual, auto?
Your problem can be caused by a lot of things. Answering some of these questions can narrow it down.