Basements are unfortunately prone to flooding. This is due to the fact that they are located below the ground level, and if there is a lot of rain, the groundwater could rise up high enough to intrude into the basement. This is a more common problem in areas that are low-lying with hills around. If this is the case for you, you definitely should have a sump pump installed in your basement.
This pump sits below the surface of the floor and will turn on when the trench it sits in starts filling up with water. They are usually built in a very simple way, with a floater that will move when the water rises, turning the pump on. If you know there are heavy rains coming, it might be a good idea to test that your pump is working properly, especially if it hasn’t run for a while. Pouring some water into the trench should cause the pump to turn on and pump it out. If it doesn’t check that the floater hasn’t dried stuck.