Life in those times was not as clear cut as they are today, and often the genuine next in line to the throne did not always get to be king or queen.
Sometimes the lords and barons, who were the powerful people in the country, would put someone on the throne who they felt was better suited than the actual next in line.
Depending then on marriages, and children, there could be 2 or 3 people from different families who felt they had a claim to be next in line, which of course then led to all sorts of conficts and wars.
There was also debate about whether succcession went through the male heirs or the female.
Take the case of Lady Jane Gray, a poor young girl in her late teens, who was pushed into becoming Queen by the powerful lords behind her.
Her claim was dubious and she only "ruled" for a week before being beheaded. Poor girl.
http://en.wikipedia.org/wiki/Lady_Jane_Grey