When Maw of the Mire resolves, the targeted land is destroyed and the controller of Maw of the Mire will gain four life. If for any reason Maw of the Mire does not resolve, no life is gained. This can happen if some other spell or ability specifically counters Maw of the Mire, or if it becomes countered on resolution.
For example, if Maw of the Mire were to target a Ghost Quarter, the controller of the Ghost Quarter could respond to this spell by activating Ghost Quarter’s ability. As the Ghost Quarter is sacrificed when its ability is activated, this would mean that Maw of the Mire no longer has a legal target. When Maw of the Mire would resolve, it becomes countered by the game rules. When this happens, no part of the spell resolves and the controller of Maw of the Mire will not gain any life.