The term magnitude is used to define the apparent brightness of an object from Earth. The scale has its origins in the Hellenistic practice of dividing stars, visible to the naked eye into six magnitudes.
The brightest stars were said to be of first magnitude while the faintest were of sixth magnitude by visual perception.
Each magnitude was considered to be twice the brightness of the following grade (a logarithmic scale).
Nowadays there are more than six magnitudes and the use of negative values were introduced. So our Sun have an apparent magnitude of -26.73 whilst Uranus is 5.5
See related for for information