Start from the easiest, simplest things, like checking spark plugs, spark plug wires, ignition coils. If any of these parts has a problem, it will cause rough idling or riding, just like what you mentioned.
If the CHECK ENGINE indicator is solid on, you can read the code saved in the computer with a code reader or scanner. Post the code here, maybe someone can help you out.
One tip for checking spark plug wires. Start your car in a dark night, check if there are any sparks around the outside of wires. If so, you are a lucky guy, changing wires will fix it.