There were a few stages alltogether for everyone who wanted to become a knight.
First, you had to have the right background (example - your father being a knight before you).
Then they would be brought up in a family up to the age of 7, where parents would teach them about knight-related things.
After this, they would be sent to lords or barons of different houses/castles, where boys would serve as a page.
After being a page for a certain time period, boys would progress to squires which were basically servants of knights. They had to help them get prepared for battle and also through this gained themselves many skills.
The last thing was actually becoming a knight where a cerenomy was required for everyone who wanted to undergo this ritual.