user20100: I am playing with my friend. I didn't notice that my king was in check, so I made an illegal move. We noticed this after several more moves. 
What should happen next? Do we restart the game or continue it as is?

user10075: FIDE Laws of Chess 7.4a

If during a game it is found that an illegal move, ..., has
  been completed, the position immediately before the irregularity shall be
  reinstated. If the position immediately before the irregularity cannot be determined
  the game shall continue from the last identifiable position prior to the irregularity.
  The clocks shall be adjusted according to Article 6.13. The Articles 4.3 and 4.6 [touch move] apply
  to the move replacing the illegal move. The game shall then continue from this reinstated position.

Of course, if you are playing with your friend, you can choose to do whatever you feel would be best. The above is simply what would happen in a FIDE tournament.

20100: <p>I am playing with my friend. I didn't notice that my king was in check, so I made an illegal move. We noticed this after several more moves. </p>

<p>What should happen next? Do we restart the game or continue it as is?</p>
 10075: <p>FIDE Laws of Chess 7.4a</p>

<blockquote>
  <p>If during a game it is found that an illegal move, ..., has
  been completed, the position immediately before the irregularity shall be
  reinstated. If the position immediately before the irregularity cannot be determined
  the game shall continue from the last identifiable position prior to the irregularity.
  The clocks shall be adjusted according to Article 6.13. The Articles 4.3 and 4.6 [touch move] apply
  to the move replacing the illegal move. The game shall then continue from this reinstated position.</p>
</blockquote>

<p>Of course, if you are playing with your friend, you can choose to do whatever you feel would be best. The above is simply what would happen in a FIDE tournament.</p>
