This can be very frustrating especially if it happens mid print. The most common problem is that the first layer did not bond enough to the print bed. There are a few things that can help in this situation.
To increase the chances for good adhesion it helps if the print bed has a textured surface to stick to. You can try adding another material such as applying a thin layer of glue stick, masking tape or hair spray.
Having a level print bed is very important. If the nozzle is too high then the filament will be printing into thin air and will harden before it touches the print bed and will not be able to stick properly. If the nozzle is too low then the filament will not have enough space to extrude and you may not have any filament coming out of the nozzle. The nozzle needs to be just high enough so the filament is pressed into the bed at the right height and sticks to the bed. First layer should be around 0.2 – 0.25mm high.
The print bed is dirty or has oils on it from touching it too much. This can be remediated by cleaning the print bed each time with isopropyl alcohol.
Some models at the base just doesn’t have enough surface touching so it makes the print easy to break away from the bed. In the slicer software you can add what is called a brim or a raft to the base to help give the object a larger base to stick to.
You can also add an auto leveler such as a BL Touch if your printer doesn’t have one already. It will probe your print bed and adjust for any inconsistencies in the bed even if it is warped.