Article snapshot taken from Wikipedia with creative commons attribution-sharealike license.
Give it a read and then ask your questions in the chat.
We can research this topic together.
The medal table is based on information provided by the International Olympic Committee (IOC) and is consistent with IOC conventional sorting in its published medal tables. The table uses the Olympic medal table sorting method. By default, the table is ordered by the number of gold medals the athletes from a nation have won, where a nation is an entity represented by a NOC. The number of silver medals is taken into consideration next and then the number of bronze medals. If teams are still tied, equal ranking is given and they are listed alphabetically by their IOC country code.