There can be many causes for this to happen including those mentioned in the earlier response and the rear wheel not being mounted straight in the frame.
In your case based on what you have said about having to hold the shifter lever to keep it from moving,
I think maybe the problem is with your shifter lever itself. The derailleur is spring loaded and when no tension is applied via the cable, it will move the chain unto the largest sprocket on the rear wheel, the one closest to the spokes. Older shifter levers were friction mounted, but newer ones have a ratcheting mechanism to prevent the lever from moving when you are on a sprocket other than the largest one. It sounds like you need to adjust, tighten or replace the shifter lever mechanism.
As mention earlier, chains do stretch out as they wear, which means they no longer mesh perfectly with the teeth on the sprockets. Besides allowing the chain to slip off the sprockets easier, a stretched chain also causes premature wear of the teeth on the sprockets, giving them a more pointed appearance. A chain gauge tool can be used to see if your chain is stretched. Conversely, if you put on a new chain but your sprockets are worn down, then your new chain will stretch prematurely & probably still slip off the sprocket when you pedal hard. Chains that are worn should be replaced, preferably before it breaks and you are miles from nowhere. Carrying a small "master" chain link in your patch kit can usually hold your broken chain together until you get a new one.