Tapping is how you signal that a submission has worked. You strike your opponent's body or the mat at least twice with your palm or fingers, or say "tap" clearly if your hands are pinned. The tapping player concedes the roll or the point; the applying player releases immediately.
The tap-and-release contract is the foundation of safe BJJ training. You tap before you are injured; your partner releases before they have to think about it. Both norms must hold for the culture to work. Hesitating to tap because of ego is a common beginner mistake that leads to unnecessary injuries.
In competition, a verbal tap is binding. In training, tap early and often — there is no shame in it, and there is always the next round.