To prevent an overload, an electric circuit breaker is installed. The circuit breaker is a switch. Plain and simple. How it works is very complex in one sense, but very simple in another. You will learn all the ins and outs during your studies as an electrician apprentice.
Electricity flowing through a circuit needs to have a continuous flow. Any break in this flow will instantly cut the "juice", or power. Any device depending on this juice will stop in its tracks. In most cases you don't want this to happen.
The last you want is for the power to suddenly cut off when you are in the middle of a vital cut with your electrical saw, or at the climax of an extremely intense movie.
But, there are times when a sudden cut in the power supply can save your a home. A circuit breaker may not save your life, but it will save the life of the fuses in a home you are working in, or expensive appliances.