Microcontrollers allow you to control circuits by using a programming language. Real, physical circuit components can become variables in your virtual programming world and you can act on them as you would on virtual objects in your program. Since programs can access networks, one can collect data produced by a circuit, process it into information, and send it to a remote database via the internet, in effect automating scientific data recording. The reverse process allows information to be sent to the microcontroller via the internet (from the result of a website interaction) and the behavior of the circuit can be changed based on those remote inputs.
The programs that control your circuit would live on the microcontroller and they are able to read voltages and produce voltages in the circuit. When voltages are read, they represent different states of the circuit e.g. whether a button is on or off or a sensor measurement. When voltage is produced, the program can alter the behavior of the circuit. When reading and writing are combined, one can utilize feedback and alter the behavior of the circuit based on the states it is in. The produced voltages can provide enough power for smaller circuits, but if more power is needed, smaller circuits can be activated with this lower voltage to drive higher power applications.
Microcontrollers are a tool that allow for, oftentimes, a simpler, more efficient, and faster implementation of various circuit behaviors. This is not to say that they are more energy efficient than a well designed, single-purpose circuit. For example, if we need to build a circuit with an LED that blinks every second, this can be implemented without a microcontroller, however by using a microcontroller, we have the ability to easily code this behavior using object-oriented methods. If we want to tailor the light's behavior later to change its blink rate, for example, this can be done with lines of code instead of wires and capacitors. The power and simplicity of a programming language allows us to manipulate the electrical inputs and outputs without knowing about different circuits and circuit components that would create the behavior we want. This allows a single circuit connected to a microcontroller to have an incredible number of behaviors.
The microcontroller is connected to a program virtually, however to be useful it must be physically connected to the world with sensor circuits and actuator circuits. Sensors take the world and convert it to electricity. Actuators take electricity and change the world. The microcontroller is the bridge between ideas and physical form.