If you are the first person to join a game, you're given 20 minutes to find an opponent. If you're not matched up against somebody, your game expires and any entry fees are returned to you.
If you're challenging somebody to a game, they are given 20 minutes to respond. If they don't respond, your game expires and any entry fees are returned to you.
You are also able to cancel Head-to-Head games before you're matched up with someone.