The game tree
At the root it is our turn, MAX plays: we have three moves. After each move the opponent MIN picks one of three replies. The squares at the bottom are the scores where the game ends; a high score is good for us.
In branch 1 the opponent picks 3
The opponent plays against us and picks the smallest score in this branch: 3. If we enter this branch we get at least 3, whatever the opponent does.
In branch 2 the opponent picks 2
The opponent plays against us and picks the smallest score in this branch: 2. If we enter this branch we get at least 2, whatever the opponent does.
In branch 3 the opponent picks 2
The opponent plays against us and picks the smallest score in this branch: 2. If we enter this branch we get at least 2, whatever the opponent does.
We pick the largest
The root looks at the values of the three branches: 3, 2 and 2. MAX picks the largest: 3. The red edge is move 1.
The expected end of the game
If both sides play their best, the game ends at the red leaf with a score of 3. That is the minimax value: the best score we can guarantee against the opponent.
Why it matters
Chess, checkers and tic-tac-toe programs choose moves with minimax. In real games the tree is huge, so the search stops at a certain depth and scores the position there with an evaluation function. Alpha-beta pruning finds the same result while looking at fewer leaves.