It's the famous game Minesweeper. There are three difficulty levels. It's possible that you may have to guess in order to solve the game. I didn't take that into account when making the algorithm to generate the boards.
To run the game you have to run main.java (no executables here).
Left click to reveal a square and right click to toggle a flag. To change difficulty just click on the desired difficulty on the side of the window. You can also reset the game by clicking on the same difficulty that is already selected.
Made with Java's AWT API.