system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Computers. How could people make a pile of metal "understand" bits of code and do an action according to that?
gpt
It starts with a transistor. A transistor is basically a piece of electronic that has 2 states, on or off - think of a light switch. If its on, electricity passes. If its off, electricity doesnt pass. So, with one transistor, you can represent 2 values - on or off, true or false, 0 or 1. It can be whatever you call it. This is called a bit. 

So, we add more transistors. With 2 transistors, you can represent 4 values (00,10,01,11), with 3 transistors you can represent 8 (000,100,010,001,011,111,101,110) and so on. As you can see, more transistors you have, more data you can store. We can also do calculations with transistors, using logic gates. Dont forget that there are two possible values, 0 or 1, and it just so happens we have a perfect way to do math with them- it is called boolean algebra, and it was invented about 100 years before the first computer.

Ok, now you have a pile of silicone and metal that can hold data and do calculations. The first computers were entirely hardware based and they used levers or punchcards for input. Back then, programming was organizing the transistors in correct positions to do calculations. The input you make was represented with zeroes and ones, this is called the machine language. Years and years later, after some serious technological advances, this was deemed too hard and time consuming. So what they did is basically bind long and complicated inputs into smaller, more understandable (relatively) words. For example,
    
    0100101010 01110101010101 010101 

became 

    MOV AL, 1h  
    MOV CL, 2h 
    MOV DL, 3h         

This went on for years, then one day someone decided to go one step further and created the first modern programming language. Now, the subject of which language is the first programming language is up for debate. To put it simply though,

    MOV AL, 1h  
    MOV CL, 2h 
    MOV DL, 3h   

became

    test1 = some_function();
    if (test1 > 0)
         test2 = 0;
    else
    test2 = other_function();
    return test2;

And this is where we are today, more or less. See how much easier it is to read, compared to the others? It actually has english words in it. Nowadays, we have smart compilers and IDEs, and programming is easier than ever. Back in the day, you would write your code, compile and pray.