The Act of Settlement is one of the key statutes that - along with other Statutes (also known as 'Acts of Parliament'); cases; and other non-legal rules such as conventions - make up the so-called 'unwritten constitution" of Britain. It not only defines who can be the Head of State, but adds to the Bill of Rights in laying down the limits of the power of the monarch relative to Parliament.
It was designed to ensure that England never again became a Catholic country. The only legitimate line of descent of the Crown was through the Protestant branch of the royal family. To make doubly sure anyone who becomes a Catholic is disqualified to be monarch. This law is still in force!
The text of the Act is available
here.