Unless you go to work for a builder, who may (or may not) offer a salary plus some sort of commission on sales, agents get paid by commission...period. It's a results based industry. You get paid after a successful closing.
Keep in mind that your broker will take a portion of your commission check earned for his/her share as well. You'll also need to set aside a portion of each check to pay your taxes -- income, social security & medicare. Remember, your broker does not contribute to the SS & medicare, it comes entirely out of your pocket.
You will also have to join the local MLS & pay local/state/national board dues in order to have access to the MLS data for agents.
Expect start up costs to run upwards of $2000. Then there are the ongoing expenses such as business cards, lockboxes, advertising, etc.
As a new agent, it is typical to go at least 2 or 3 months before you earn your first commission check.
Real estate can be a rewarding career, but you need to be aware of what to expect up front in the way of expenses. Approximately 80% of new agents leave the industry in a year or less. With good planning, you can become one of the 20% that make it.
Good luck with your new career.