Someone has a right according to Mill

According to Mill, what do we mean when we say that someone has a right? Why do we attribute rights to people, and what morally justifies the protection of rights?