Short answer: a computer is a machine which executes algorithms.
An algorhthm is a step-by-step procedure for getting something done.
A good example of an algorithm is a recipe.
OK, you set out to follow this recipe/algorithm, and you check the ingredients against what you've got in the kitchen, and you realize you're fresh out of sugar. What do you do? You execute another algorithm called go-to-the-store.
In Southern California, that algorithm goes something like this:
Walk from [your kitchen] to [your car].
Drive to [your local store].
Walk from [your car] into [your local store].
For each [listing] in [your shopping list]:
Pay for everything in [your basket].
Walk from [your local store] to [your car].
Get into [your car].
Drive to [your house].
Get out of [your car].
Walk from [your car] into [your kitchen].
The parts of the algorithm written in square brackets suggest a thing called a variable, which is something which plays the same role every time you execute the algorithm, but which may differ every time you execute it.
We can talk about the input to this subroutine, which includes [your shopping list], [your car], etc. We can also talk about the output of the algorithm, which is a bag full of groceries.
BTW, you are the operating system in this analogy, by virtue of the fact that you know how to read recipes, turn on ovens, drive the car, etc.
Notice that the go-to-the-store subroutine is quite modular, you can use it whenever you need stuff, not just when you're following recipes. After you've executed the go-to-the-store subroutine, you continue with your recipe without giving it any more thought.
Notice also that a number of subroutines are also implicitly being referenced in our go-to-the-store algorithm.
First we need to talk about digital data. Let's start with a light switch. We can talk about whether the light is on or off. A light switch has two possible states. If we have two light switches, we have four possible states. Every time we add a light switch, we double the number of possible states. Each switch represents one bit of data.
As long as we recognize each state as a separate entity, we can come up with some kind of scheme whereby each state has its own significance. We could use this to implement a counting system. Say all the light switches are off. We'll call that zero. Turn the right-most switch on. That's one. We can continue doing this systematically, and if we have ten light switches (or fingers), we can count up to 1023, or 1 K. if we use 32 bits, we can count up to 2^32, or 4,294,967,295. We don't have to make these correspond to numbers, we can let them correspond to letters, a spot of color on the screen, or anything else. For any formal system the set of unique configurations that system can be inis called its state-space.
One of the things we can use this digital state-space for is to implement an address scheme for memory, or on a storage device.
So how does a computer execute algorithms? A computer relies on a central processing unit, or 'CPU'. A CPU has some number of registers, each of which can hold a datum of say, 32 bits. The CPU can only do so many things to these data. It can:
The cpu has a special register called the program counter which holds the address of the next instruction to be executed. Each instruction is itself a piece of digital data; part of the instruction set of the CPU. So starting with a program loaded into the memory of the computer, with the program counter pointing to the first instruction in that program, the processor goes through a cycle of interpreting and executing the instruction, incrementing the program counter, and repeating over and over again.
The CPU communicates with other parts of the computer through a data bus. This is basically set of wires (one for each bit), each of which during any 'cycle' of cpu operation is either charged 'on' or 'off'. By the device which is
writing to the bus, so that other devices can
read those values.
For a little more depth on this subject, check out these lecture notes from De Montfort University in the UK, or these, from James Cook University in Australia.
In addition to this, computers make ample use of a simple
data structure called a stack. Referring back to our recipe example, when we set a subgoal to execute the go-to-the-store subroutine, once we have our shopping list in hand, we can forget all about our escapades in the kitchen and go about the business of driving the car, reaching for the sugar, paying the bill, whatever. This can be likened to pushing a new item onto the the old 'make-apple-pie' routine, in effect hiding the old goal with a new one until that step in the process is done. When we come back from the store, we pop the go-to-the-store subroutine, and go on about the business of baking our pie.
Here's what a stack of subroutines might look like as we're reaching for the sugar:
Reach for the sugar.
Put sugar in my shopping basket.
Find items on shopping list and put them in the basket.
Go to the store.
Bake a pie.
Prepare for that big date.
Find a mate.
So here's what's problematic about using computers to deal with language: referring back to the recipe example, imagine the complexity involved in trying to break down each action into smaller and smaller parts until it amounts to reading or writing a datum, or comparing two data or doing some arithmetic.
This is what's meant when they say that computers are stupid. Any kind of programming to a computer has to be totally unambigous, and very, very detailed.