Building logic
Let's give the machine a problem. Two numbers: A and B. They could be anything.
We want to know: is A bigger than B?
We could answer that ourselves. But this is the simplest example of a problem a machine can solve. Understand it here, and everything else is the same idea, scaled up.