There are two ways to recruit units: You can use the "Recruit" icon seen at the bottom of the castle and map screens, or you can select a military building and choose the "Recruit" option there. Once you are in the recruitment screen, you can either use the slider and move it to the right (or left to subtract recruits), click on the + or -, or you can just type in the amount of recruits you want to recruit in the field on the right of the slider.
In the recruitment screen you can recruit any unit of any race, as long as they are unlocked. Recruitment costs either gold or resources and time. You can only recruit a certain amount of units at the same time and your military buildings only have a certain unit capacity. Those values can be changed through equipment, researches and upgrading.