Can the king capture his attacker? Can the king get out of check by capturing his attacker? For example, if the queen comes right in front of the king, can the king capture the queen, or must another piece capture the queen?
There are three ways to get out of check. 


Simply move the king away. 
Block the check, or place a piece in between the king and the opponent's attacking piece.
Capture the piece that's checking the king. 


All of these cases are dependent on the fact that immediately after you make your move, the king is not in check. Therefore, you may capture the queen so long as the king is no longer in check after you make your move.