For full rules and mathematical theory see https://en.wikipedia.org/wiki/Nim#Game_play_and_illustration
Basically you have 5 rows of matchsticks:
Row 1 has 1 matchstick,
Row 2 has 2 matchsticks,
Up to row 5 with 5 matchsticks.
You and your opponent take it in turn to remove 1 or more contiguous matchsticks from a single row.
The player to take the last matchstick loses.
Have a go and try and beat the computer.