the code you type is broken down by a compiler into machine code. machine code are ons and offs of switches that power on certain electrical devices in the computer the number of switches large so a lot of patterns for generating different electric signals can be made. those electric signals can be amplified to have more power like how a amp makes sounds louder but still the same notes.
as for physical movement it could be a number of mechanisms the most common I speculate is through electromagnetism essentially running current through a conductor makes a magnet with a given polarity run the current the other way and the polarity switches. magnets attract unlike poles and repel like poles. those pushes or pulls can be light and fast like a speaker or stronger and more constant like a motor.
Latest Answers