I assume it's the left pedal, which can indeed work itself loose as you pedal.
So, unfortunately, when a pedal comes loose, most people's immediate reaction is to thread it back on and go about their day. In fact, it really ought to be examined closely to determine why it came loose the first time, and then carefully reinstalled with the proper torque. You MUST use a wrench to tighten pedals on, and at that it should be a pretty big wrench too.
The problem is that loose pedals can damage the threads in the crank, making it a problem that eventually can't be fixed. If your pedal, which you retightened after if first came off, is still coming loose, I fear that may be what's happening to you right now.
Take the pedal off and closely examine the threads on the inside of the crank. The threads on the pedal are hard steel and will likely be fine. If there's any sign of damage, replace the crank. If it truly looks good, first apply grease to the threads and retighten it properly, with a pedal wrench. The grease is essential. Not only will it prevent it from seizing and permanently welding to the crank, but it will actually help make it tighter.
PS - there are only two thread sizes of pedals and it is extremely obvious if you have the wrong one.