The goal in minesweeper is to identify every place it is safe to stand in the minefield. In the aim of doing this, you can reveal spaces to see if they contain a mine, or you can mark a space to declare that you think a mine is there.
If you click on a square with your left mouse button, it will reveal a square. That square will either be blank, have a number in it, or have a mine in it. If it is a mine game over. Otherwise, the number (or lack therof) tells you how many immediately adjacent squares (laterally and diagonally) contain a mine.
If you believe a space contains a mine, right click on it and it will "flag" that space. Flagging a space is a reminder to you that a mine is there, however it does not prevent you from revealing that space if you wish.
To easier be able to see which squares surround a particular space, simply click with both the left and right mouse buttons simultaneously to highlight the surrounding spaces.
If you proceed by marking the spaces you believe to be a mine, and you simultaneously click with both left and right mouse buttons to indicate, if the number in the cell you are clicking on is equal to the number of surrounding flags, the game will automatically reveal all unflagged hidden spaces.
At the end of the game, win or lose, all mines will be revealed. If you successfully identified a mine location, it will be green, however if a mine exploded, it will be red. Any incorrectly located flags will stay put.