A basement window well is right up against the basement window on the outside of the house. It is a hole outside the window that is dug away, to create light and air movement in your basement. Having a big hole in the ground, the soil has to be prevented from eroding or from coming back in towards the window. So there is a galvanized metal half circle around the base of the window that attaches to the sides of your window. They make these for light and air inside the window.
When it rains the water can fill up in the window well. Sometimes it can fill up above the base of the window. Water can enter the basement this way. Basement windows are not meant to be port holes! There are a few things that can be done. The hole can be dug deeper so the water can percolate away. Or you can buy a plastic dome or window well cover that fits over the window. The trouble is they blow away, crack and don’t make a tight fit. Some window wells have metal grates over them to stop debris from getting in. Well, it stops some things, but not water. A trench can be dug from the bottom of the window for gravel or a pipe to carry water away if there is enough space and pitch. But not everyone has the luxury of enough space.
One of the best ways to take care of this is to get a very thick window well cover that you can actually stand on. They are clear, so the light gets through, and they are measured and fitted to your particular window well, so they have a tight fit. This way water cannot get in there.