user23026: If I play as White and use my queen to check Black on every move, and Black can only move their king to get out of the check, can I win the game?  White could move something else, but they decide to check on every move.
This happened years ago when I was new to the game in a tournament, and the referee gave me the win as it was not checkmate, but my opponent only had a king and two pawns left. Was that my win?

user224: 
Is the game done if your only movement is getting out of check?

No. By rule, your only legal move when in check is to get out of check if you can. If you cannot, the game is over, as it is checkmate.

If I play as White and use my queen to check Black on every move, and Black can only move their king to get out of the check, can I win the game? White could move something else, but they decide to check on every move.

Initially, the game isn't over just because you keep putting the other player in check. However, if this goes on long enough without any captures or pawn moves, your opponent could invoke the 50 move rule. If that doesn't happen, the tournament director (TD) could eventually invoke the 75 move rule (referenced at the same Wikipedia link as the 50 move rule). In either case, the game would be a draw. Also, before you invoke one of those rules, you may achieve a threefold repetition, which is also a draw.

This happened years ago when I was new to the game in a tournament, and the referee gave me the win as it was not checkmate, but my opponent only had a king and two pawns left. Was that my win?

Taking the last first, yes, it was your win. However, instead of a win on the board, the TD gave you the win by adjudication, because in their opinion you would have gotten there eventually. There may have been a time constraint to be met - perhaps the next round needed to start to keep the event on schedule, or - if it was the last round - the room needed to be vacated for another event.

user4362: No, this is not a win.
What you describe is called perpetual check and according to the rules of chess it results in a draw. 

23026: <p>If I play as White and use my queen to check Black on every move, and Black can only move their king to get out of the check, can I win the game?  White could move something else, but they decide to check on every move.</p>

<p>This happened years ago when I was new to the game in a tournament, and the referee gave me the win as it was not checkmate, but my opponent only had a king and two pawns left. Was that my win?</p>
 224: <blockquote>
  <p>Is the game done if your only movement is getting out of check?</p>
</blockquote>

<p>No. By rule, your <em>only</em> legal move when in check is to get out of check if you can. If you cannot, the game is over, as it is checkmate.</p>

<blockquote>
  <p>If I play as White and use my queen to check Black on every move, and Black can only move their king to get out of the check, can I win the game? White could move something else, but they decide to check on every move.</p>
</blockquote>

<p>Initially, the game isn't over just because you keep putting the other player in check. However, if this goes on long enough without any captures or pawn moves, your opponent could invoke the <a href="https://en.wikipedia.org/wiki/Fifty-move_rule" rel="nofollow noreferrer">50 move rule</a>. If that doesn't happen, the tournament director (TD) could eventually invoke the 75 move rule (referenced at the same Wikipedia link as the 50 move rule). In either case, the game would be a draw. Also, before you invoke one of those rules, you may achieve a <a href="https://en.wikipedia.org/wiki/Threefold_repetition" rel="nofollow noreferrer">threefold repetition</a>, which is also a draw.</p>

<blockquote>
  <p>This happened years ago when I was new to the game in a tournament, and the referee gave me the win as it was not checkmate, but my opponent only had a king and two pawns left. Was that my win?</p>
</blockquote>

<p>Taking the last first, yes, it was your win. However, instead of a win on the board, the TD gave you the win by <a href="https://en.wikipedia.org/wiki/Glossary_of_chess#A" rel="nofollow noreferrer">adjudication</a>, because in their opinion you would have gotten there eventually. There may have been a time constraint to be met - perhaps the next round needed to start to keep the event on schedule, or - if it was the last round - the room needed to be vacated for another event.</p>
 4362: <p>No, this is not a win.</p>

<p>What you describe is called <a href="https://en.wikipedia.org/wiki/Perpetual_check" rel="noreferrer">perpetual check</a> and according to the rules of chess it results in a draw. </p>
