If the water is coming in from the outside and it is coming in from the city sewer line or the septic system, you can install a backwater valve on the line inside the house or just outside of the house. A backwater valve has a flapper that only allows the water to travel out of the house, but shuts down when it tries to reverse.
If the problem is occurring because you have water coming in from the outside alongside the foundation from the rain itself, then you need to waterproof your foundation. This often requires installing a sump basin and drain tile around the foundation to collect the water and pump it outside to a low area where it can run away from the home. In addition, you should raise the landscaping around the foundation so the water runs away from the house and not towards the house. You may also want to install rain gutters to collect the water and run it to a lower spot in the yard.
If the water is coming in from any other source you will have to determine the cause and then repair it to prevent infiltration.