A rank is a position in the hierarchy of an organization. For example, ranks exist in the military, the police, but also in religious orders, organizations such as the Boy scouts, or in companies. Ranks used to be very important among servants in a household, too.
Within an organization, a person of higher rank usually has responsibility and authority over people of lower ranks. A person of lower rank is expected to show respect and obedience to people of higher rank. A person of higher rank may be entitled to give orders to people of lower rank and/or to punish them for poor work, disrespect or disobedience.
Note that rank usually has validity only within one organization. Across organizations, or to people outside, rank has no direct (legal) meaning and often cannot be compared.