Minesweeper is a game of logical deduction. Hidden beneath a grid of cells lies a smaller number of lethal mines. Left-clicking explores a cell, proving whether there was no mine (breath of relief) or a mine (game over). When a cell is explored, you then learn the number of mines in the 8 adjacent neighbors, but not their locations. (A blank means zero neighboring mines.) By combining the information, you can deduce where exactly mines lie.

For your convenience, by right-clicking, you can mark cells as hypothesized to hold a mine. This is strictly a reminder for you and doesn't disclose any new information or expose you to any new dangers. A marked cell can be unmarked, or can be explored (which implicitly unmarks it). A cell that has already been explored cannot be marked, as we already know there wasn't a mine there.

To win the game, you need to explore (clear) all safe squares. The only remaining squares are mines, which may or may not be marked. To guide you toward the goal, two numbers are at the top: the number of mines minus the number of marks you have placed, and the number of safe squares remaining.