Tap a square to dig. A number tells you how many mines touch that square. Flag the mines, clear every safe square, and you win. Your first dig is always safe.
Tap does the DIG or FLAG button you pick. Hold a square to do the other one. Tap a number that has enough flags around it to clear its neighbours.