First - check the shifter to see what gear your bike is in. Then, count up from the smallest sprocket to see what gear the chain should be on. You want to pull the chain with your hand to dislodge it if it is stuck between the wheel and the gears, or between the gears and the frame. Once it’s loose, slowly pedal forward to get the chain back on the gear. Once it’s back in place, you want to adjust your derailleur to ensure it doesn’t fall off again. Take a look at the following link: https://www.parktool.com/blog/repair-help/rear-derailleur-adjustment
This is also something any local bicycle shop can help out with if needed.