Tip: right-click, or press and hold, to put a flag.
Open all the squares that do not have a mine. The numbers tell you how many mines are next to a square.