>>13204960To add on, in Japanese Mahjong you also need to have a yaku to win. A yaku is a special hand, for example "only has numbers 2 to 8", "the same straight in each suit", "only three of a kinds, no straights". There's like 20-30 of them to remember, each worth a different number of points called han.
https://en.wikipedia.org/wiki/Japanese_Mahjong_yakuOnce you have a winning hand, the scoring is even more complicated, but the computer or an experienced player can do that for you. If you have a tile with a special mark on it, or if it's one after a tile from the bottom of the deck, then it's called a dora and you get another han. Then there's another kind of point called fu, which keeps track of how hard it was to get the last tile in your hand. The total number of han and fu determines your total score with a complicated calculation that most people use a table for. Finally, if you got your last tile from someone else, that player pays you. If you drew your last tile yourself, everyone pays you. If you're the dealer, you pay/get paid more.
There's a lot more arcane rules, but basically you want to make the best hand you can before anyone else makes their hand. And if anyone is close to completing their hand, you should pay attention to their discards so you don't discard a tile they can use to win.