Nine things can stop a chess game, and only three of them hand somebody the whole point. Beginners tend to know one of the nine, which is how you end up with an 800-rated game finishing in a draw that one player did not want and the other did not know they had just earned.
The three ways to win
Checkmate is the first, and it is the only ending that needs no agreement from anyone. The king is attacked, there is no move that stops the attack, and the game is over that instant under Article 5.1 of the FIDE Laws. Nobody plays on, nobody captures the king.
Resignation is the second, and it is how most master games actually stop. You tip your king over or you offer a handshake and say the word. Article 5.1 again, and it takes effect immediately: how to resign covers the etiquette, though at beginner level my advice is to do it far less often than you feel like.
Time is the third. Your flag falls, you lose, under Article 6.9. One exception matters: if the player still on the clock could not checkmate you by any series of legal moves, it is a draw rather than a win, so a king and a knight against your lone king gets nothing when you flag. That is what happens when your time runs out.
The six ways to draw
Stalemate: the player to move has no legal move and is not in check. Half a point, and it has rescued more lost positions than any other rule. Read what stalemate is before you try to win an endgame with a queen.
Agreement: one player offers, the other accepts, and it is over. Offer after you move and before you press the clock.
Threefold repetition: the same position, with the same player to move and the same possible moves, turns up three times. Article 9.2, and you have to claim it. Perpetual check is this rule wearing a hat.
The fifty-move rule: fifty moves by each player with no capture and no pawn move. Article 9.3, and again you claim it.
A dead position: neither side can ever deliver mate, so play stops at once. The everyday case is insufficient material, a king and one bishop or one knight against a bare king.
And the automatic pair. Article 9.6 draws the game with no claim at all once the same position has occurred five times or seventy-five moves have passed without a capture or a pawn move. Those exist so nobody can sit there repeating forever.
Three things that feel like an ending and are not
Losing every piece except the king does not end anything. You keep playing, and a lone king can still stalemate its way to half a point.
Being in check does not end anything either. You have three ways out and you must use one of them.
Nor does a draw offer. Refusing is free, it costs you nothing, and there is no limit on how many times your opponent may ask, though repeatedly pestering someone about it is a matter for the arbiter.
If it is the drawing half you want in detail, every one of those six has its own page under draws. If it is the winning half, start with the mate you will actually get to play: mate in one.