If your dental filling falls out, you've two options: see your dentist for a new replacement or use a temporary filling if you can't get an appointment. Ultimately, leaving it alone for an extended period of time is not recommended.

See your dentist for a new filling
Your best option for a dental filling that fell out is to see your dentist and have it replaced with a new restoration. There could be many reasons as to why it fell out and that needs to be addressed professionally.
Why it's the best option: There is absolutely no way to get a replacement permanent filling without the assistance of a dentist because there is no viable DIY method. There is a temporary method but it isn't permanent like what your dentist can do.

What to expect:
You will most likely need to be numb so that your dentist can remove any residual bonding that may be left.
The appointment should take no more than 45 minutes.
If you're numb you'll need to wait at least 2-3 hours before you can eat.

Limitations: The only limitation for this option would be if you're able to get an emergency same day appointment with your dentist. If they're extremely busy, you may not be able to get seen the same day. If that is the case, you may need to use a temporary solution especially if the tooth feels sensitive or painful.
Use a temporary filling kit
If you're unable to get an appointment with your dentist, your second best option for a filling that fell out would be to use a temporary filling kit.

Where to find temporary filling kits: You can readily find these temporary kits at most pharmacies. The photo above shows a generic product that was purchased at Walgreens. You can usually expect to find a pharmacy's respective store brand version of it.
How to use them: The product comes in a putty form which you roll into a ball and then squish it into the missing filling tooth. After that it should set on its own. We do have a more in depth guide with instructions if you wanted more detailed steps.

With all that being said, ultimately you will still need to see your dentist if you use one of these lost filling kits. The main reason being that these temporary fillings will dissolve over time as it contacts saliva and also from eating.
Leaving a fallen out filling is not recommended
What is not recommended is to do nothing for a fallen out tooth filling because it can lead to more serious problems.
Consequences of do nothing:
Decay. An unprotected tooth with a fallen off filling will be more susceptible to tooth decay. Food can get easily trapped in there and that may accelerate the decay process. This will lead to needing a bigger filling or even worse, a root canal.
Pain or sensitivity. A tooth with a missing filling will often be extremely sensitive or even painful because the sensitive dentin layer is now exposed. It makes no sense deal with pain if you don't have to.
Food trap. A tooth with a missing restoration is essentially a giant hole that will trap food. That can be an extreme inconvenience and it can also lead to a cavity forming.
What if it doesn't hurt: Even if your dental filling fell out and it doesn't hurt, you shouldn't leave it alone because it will trap food and eventually turn into a cavity. At that point it will become symptomatic and start hurting you!
Ultimately, if your dental filling has debonded and has fallen out of your tooth, our dentists in Long Island City recommend scheduling an appointment to get a new filling.