By slipping out of gear, do you mean jumping from one gear to another or does the chain try to ride between gears and have trouble deciding which one it wants to be in? This can be corrected with the barrel adjuster - turn the adjuster out (making it longer) to increase cable tension until the chain is centered on a cog.

Or is the chain skipping over a tooth in a single gear? This mean that your chain and cassette are worn and need to be replaced.