I know you mainly asked about the 50 move rule, and that has already been answered, but I thought I'd answer the exact question as stated which was "With the King as the last piece, how can you get a draw?"
- Both players can agree to a draw
- Opponent Stalemates you (you have no legal moves, but are not in check)
- You stalemate your opponent (yes you can do this with just a king, but he has to help you by blocking himself with a pawn for example)
- Your opponent does not have mating material (no pawns and one, Knight or Bishop, or less)
- 50-move rule. After 50 moves have passed without a capture or a pawn advancing, you can claim a draw.
- The same position is repeated 3 times and you claim a draw. For the position to be the same it must be the same players turn and the same set of possible legal moves (including castling rights and en passant opportunities). The position need not repeat 3 times back to back, but at any time.
- Your opponent runs out of time on the clock in a timed game and you claim it. The game is drawn because you do not have mating material.
Examples
(2) Opponent Stalemates you (you have no legal moves, but are not in check)
[fen "8/3kp3/8/8/8/8/4K3/8 w - - 0 1"]
1. Kd3 Kd6 2. Kd4 e5+ 3. Ke4 Ke6 4. Ke3 Kd5 5. Kd3 e4+ 6. Ke3 Ke5 7. Ke2 Kf4
8. Kf2 e3+ 9. Ke2 Ke4 10. Ke1 Kd3 11. Kd1 e2+ 12. Ke1 Ke3
(3) You stalemate your opponent (yes you can do this with just a king, but he has to help you by blocking himself with a pawn for example)
[FEN "8/8/8/8/7R/3K4/p7/r1k5 w KQkq - 0 1"]
1. Rh1+ Kb2 2. Rxa1 Kxa1 3. Kc2
(4) Your opponent does not have mating material (no pawns and one, Knight or Bishop, or less)
[FEN "8/6q1/3k4/2n5/7Q/4K3/8/8 w KQkq - 0 1"]
1. Qd4+ Qxd4+ 2. Kxd4
(5) 50-move rule. After 50 moves have passed without a capture or a pawn advancing, you can claim a draw.
[Event "ICC 3 0"]
[Site "Internet Chess Club"]
[White "Smallville"]
[Black "depressnyak"]
[FEN "r7/3q2k1/3bb2p/r1p1p1pP/PpPpPpP1/1P1P1P2/R1Q3KN/R7 w - - 6 33"]
1. Kf2 Qe7 2. Kg2 Bd7
3. Kf2 Qe8 4. Kg2 Qb8 5. Nf1 Bc7 6. Nd2 Qe8 7. Qd1 Qc8 8. Kg1 R8a7
9. Kg2 Qa8 10. Kg1 Bd6 11. Kg2 Bc6 12. Kg1 Be8 13. Kg2 Bf7 14. Kf2 Be6
15. Kg2 Qe8 16. Kf2 Bf7 17. Qh1 Qe6 18. Kg2 Be8 19. Qd1 Bd7 20. Kf2 Qe8
21. Kg2 Qc8 22. Kf2 Be6 23. Kg2 Qe8 24. Kf2 Qd7 25. Kg2 Qe8 26. Kf2 Bf7
27. Qh1 R7a6 28. Kg2 Be7 29. Kf2 Qd8 30. Kg2 Qe8 31. Kf2 Be6 32. Kg2 Bd6
33. Kf2 Bd7 34. Qd1 Bc6 35. Kg2 Qa8 36. Kf2 Be8 37. Kg2 Bf7 38. Kf2 Qe8
39. Qh1 Be7 40. Kg2 Be6 41. Kf2 Bf6 42. Kg2 Qc8 43. Qd1 Qc6 44. Kf2 Qe8
45. Kg2 Qd7 46. Kf2 Bf7 47. Kg2 Qc6 48. Kf2 Bd8 49. Kg2 Bc7 50. Kf2 Qe8 51. Qh1
(6 The same position is repeated 3 times and you claim a draw. For the position to be the same it must be the same players turn and the same set of possible legal moves (including castling rights and en passant opportunities). The position need not repeat 3 times back to back, but at any time.
[White "Fischer"]
[Black "Petrosian"]
[Date "1971"]
[FEN "8/pp3p1k/2p2q1p/3r1P2/5R2/7P/P1P1QP2/7K b KQkq - 0 1"]
1. Qe5 Qh5 2. Qf6 Qe2 3. Re5 Qd3 4. Rd5 Qe2