There are two screw heads on the top of the shifter mechanism. Screw the outer one in, half a turn at a time, ride the bike and test, and repeat, until the chain won't shift into the large chainring. Unscrew half a turn and test. Good chance it'll be OK (and the chain will not come off in the way you have experienced).
Having suggested all that, I reiterate several other posters' (above) suggestion that you learn to index your gears. It is not easy but once you get it right you can cycle with gears that change efficiently as designed. Gears that skip or (worse) where the chain occasionally comes off are an unnecessary and avoidable hassle.