As water enters the pit, a float on the pump rises and triggers a switch that activates the pump. The pump sends the water into the drain system and shuts off when the water level drops sufficiently. Unfortunately, as with any mechanical device, your sump pump will eventually break down. When that happens, don't worry. You can replace it easily.
Sump pumps come in different sizes.
Unless you replace your pump with an identical model, you'll probably have to use a flexible tube or a piece of PVC pipe to connect the pump to your drain line. Check the owner's manual to be sure you have the proper connectors to attach the pump. Unplug the pump. Lift the sump pump out of the pit. Place the new pump in the pit, and measure the distance between the pump outlet and the house drain line.