What exactly is a stalemate?

Sort:
Phusion

Hi, sorry if this question has been asked but I tried reading lots of posts and I'm still confused. A few days ago I played some friends and I was winning, they still had a quite of few pieces left but then without me noticing it, they moved the king back and forth 3 times and claimed a stalemate. From what I read, a stalemate can only occur when you have no legal moves left and to me they had alteast 10 legal moves they could've done. I found what my friends did was a cheap way to get a draw, and to me seems like it's against the rules but I'm not 100% sure. So I was hoping that you guys can help clear this up to me.

learning2mate

A stalemate is where one side has no legal moves to make on their turn and they are not in check, which would be checkmate. A draw by repetition is when you have the same position occur three times in the same game. A simple example would be each player moving their king knights in front of their bishops three times in a row at the start of the game and then one player declaring a draw by repetition.