Fire pumps are usually housed in a pump room very close to the fire tanks. The key thing is that the pumps should be located at a level just below the bottom of the fire tank, so that all the water in the tanks can flow into the pumps by gravity.
The pumps are controlled by pressure sensors. When a fire fighter opens a hydrant, or when a sprinkler comes on, water gushes out of the system and the pressure drops. The pressure sensors will detect this drop and switch the fire pumps on.