Electrical engineering is a subject of engineering. Its goal is to develop (think and make) different things that use electricity in a helpful way. Electrical engineers fix or design new and better ways of using devices that use electricity.
Big subjects in electrical engineering include power generation, automation and control of robots, digital systems, and information technology (using radio and computers to move and use data). To meet new needs, electrical engineering produced new specialties, such as electronic engineering and software engineering.
Early universities taught this as philosophy and later as science. As the industrial revolution began they had to start teaching new parts of these sciences to keep up with the demand for new resources.
When the industrial era began, we needed to study mathematics, physics and chemistry to help support it. These subjects are "applied" (or, used in the real world) using engineering. In the late 19th century when electricity was used to make electric motors and to send messages to far away places, a new branch called electrical engineering was invented. When radio became important, many engineers worked at it, and their branch was later expanded to cover electronic engineering.