What is a substation and what are its functions in a power system?

A substation is a facility that is used to switch, transform, and control the flow of electricity in a power system. Substations are typically located at points where the transmission system connects to the distribution system, and they are used to transform the voltage of the electricity to a level that is suitable for distribution to end users.