As I understand it, the crown always goes to the male, even if they aren't descended from the King. So how did Elizabeth II end up being the monarch with the power?
What you're describing is agnatic primogeniture, which explicitly forbids the inheritance of the crown by women. What the United Kingdom operated on at the time of Elizabeth II's accession was a combination of male-preference primogeniture and the 1689 Bill of Rights.
Male-preference primogeniture requires that the crown goes to the oldest legitimate descendant of the monarch, with males counted 'higher', so an eldest child who was female would be passed over for a younger brother, or even that younger brother's sons and daughters if that brother were dead.
If the monarch has no legitimate male heirs, the crown passes to the eldest daughter and her heirs. This is how Elizabeth II came to the throne, and it was also how Elizabeth I, Queen Anne, and Queen Victoria came to the throne.
The 1689 Bill of Rights also requires that monarchs not be Catholic. This wasn't relevant to Elizabeth II's accession, but it did influence the accession of Queen Victoria.
Actually, in England all children of the previous monarch, regardless of gender, are heirs. Just the sons went first. (Although I believe they changed that just a couple years ago.) QEII has four children, and under the old rules, it was Charles, Andrew, Edward, and then Anne, each followed by their own children, despite the fact that Anne was born second. (I should check the official succession list and see if they applied that change retroactively or if it starts with William's children)
In France and some other parts of the Continent, they practiced Salic Law, which prohibited women from coming to the throne, which seems to be what you're thinking of. But they did try to find a relative, and sometimes married the princesses off to them (see Francis I).