Shift-click (or right-click) on a square to flag it as a suspected mine. Do it again to mark it as questionable, and again to clear the mark. When you've exposed all the vacant squares, you win. If a mine explodes, you lose. Click on the face to start a new game.
The left-hand counter shows the number of mines less the number of squares that you've flagged (correctly or not).Andrew Birrell. You are welcome to read its source code. Use at your own risk!