If the square harbors a mine, the player loses. If instead a number (from 1 to 8) appears on the square, it specifies how many mines are present in the eight squares surrounding the numbered square. It's clear, for example, that finding a square numbered 8 means that all eight adjacent squares contain mines.
To win a round of Minesweeper, you must click on the board every square that doesn't have a mine under it. Once you've done so, the game will be over. If you accidentally click a square that has a mine beneath it, the game will be over. You'll have the option of starting a new game or redoing the one you just played.