The job of your pump is to basically draw water through the filtration system so that the pool water is kept clean and is properly circulated.
The pump is driven by an electric motor directly attached to the pump impeller. As the electric motor turns, it causes the impeller to turn, which then forces water to flow through the pump. The water flows into the hair/lint pot inlet (i.e. an in built 'strainer' that catches leaves and other large debris before they get sucked into the pump and clog its impeller), and through the basket assembly. The flow then enters the centre of the pump housing, goes through the impeller, into the diffuser, and out the pump discharge port and onwards to the pool filter where the water is cleans again before it is sanitised and/or heated.