user12751: So, you can capture any piece in chess except for the king. But what happens if me and my opponent get all pieces captured (except for the king)?

user12540: When you only have Kings then you can take a tour of the entire board till the end of the World without any hesitation . :-) (Just Joking ) .
The Game at this point is a DRAW . Since neither Player can play without any objective and Game of Chess is all about Checkmating your King then without any material resistance it is DRAW . Infact a lone King with a Knight or Bishop and also against another King is also a DRAW material is not sufficient to Capture King .

user12752: Since you can't move your king into check, you can't legally check the other king. 
The Laws of Chess, section 5.2b, states that:

The game is drawn when a position has arisen in which neither player can checkmate the opponent’s king with any series of legal moves. The game is said to end in a ‘dead position’. This immediately ends the game, provided that the move producing the position was in accordance with Article 3 and Articles 4.2 – 4.7. 


12751: <p>So, you can capture any piece in chess except for the king. But what happens if me and my opponent get all pieces captured (except for the king)?</p>
 12540: <p>When you only have Kings then you can take a tour of the entire board till the end of the World without any hesitation . :-) (Just Joking ) .</p>

<p>The Game at this point is a DRAW . Since neither Player can play without any objective and Game of Chess is all about Checkmating your King then without any material resistance it is DRAW . Infact a lone King with a Knight or Bishop and also against another King is also a DRAW material is not sufficient to Capture King .</p>
 12752: <p>Since you can't move your king into check, you can't legally check the other king. </p>

<p><a href="https://www.fide.com/component/handbook/?id=171&amp;view=article" rel="nofollow noreferrer">The Laws of Chess, section 5.2b</a>, states that:</p>

<blockquote>
  <p>The game is drawn when a position has arisen in which neither player can checkmate the opponent’s king with any series of legal moves. The game is said to end in a ‘dead position’. This immediately ends the game, provided that the move producing the position was in accordance with Article 3 and Articles 4.2 – 4.7. </p>
</blockquote>
