Numbers count the rugs touching that square. Click to reveal, right-click (or flag mode, or a long press) to plant a flag. Your first click is always safe. Click a number once all its rugs are flagged to open the rest of its neighbours at once. Clearing faster scores higher, and harder boards are worth more.