Direct entry
The player is ranked high enough. This is the case for most of the draw.
Qualifier
He has won a mini-tournament just beforehand, often 2 or 3 matches in a few days.
Wild card
The organiser gives him a place, often a young player or a home player, whatever his ranking.
Lucky loser
Beaten in the last qualifying round, he gets a place when a player in the draw withdraws. He often finds out at the last minute.