the Prime minister is in charge, but the reigning monarch (the queen at the mo) is the figurehead.
Queen is married to her consort prince philip (also known as Duke of Edinburgh)
They have four children who are in line to the throne, at this level is is age/gender related so the oldest male, next older mail, younger mail, the female.
However has all of the queens children have children it again gender ages through each family group so in line to the throne in order is...Charles, william, harry, andrew, beatrice, euginie, edward, edwards sone, edwards daughter, ann, peter philips, zara (the list goes on).
Recent legislation says that from now on the gender is taken out of the eqation, but that this does not effect the existing line, however once William has a child of either gender that child joins the line of sucession and moves everyone else down a place.
It is common in modern times for royals to have two children (an heir and a spare), once williams child has a child everyone else higher in the list is either dead or gets knocked down one on the list....
so IF harry(3rd) died, andrew is next(moves from 4th to 3rd), but then baby (becomes 3rd) arrives so andrew goes down the list to 4th again,
in realitiy in 30 year time Queen is dead and charles is dead so William is king, baby is 2nd, another baby 3rd, harry 4th. Andrew probably dead. Baby in 2nd place has a baby so baby in 3rd and harry move down to 4th & 5th...