The quick answer is it depends. Some Realtors rely on referrals and word of mouth while others invest heavily into marketing themselves.
For myself I tried heavy marketing early in my career and found it to be very difficult to out-market the agents that had been in the business for decades. I still market my recent sales via direct mail (at a cost of around $250 per sale), but the majority of my listings and buyer clients come from referrals and word of mouth.
My office overhead is around $800 per month. This covers my brokerage fee, insurance and board fees.
Other monthly costs related to marketing include website hosting, my email campaign program and a company that I pay monthly for statistics (SnapStats). These costs amount to around $300 per month.
I also have ongoing education at around $500 per year. The real estate council and real estate board requires that all agents take a certain amount of professional courses every 2 years.
As I mentioned above, most realtors invest in marketing themselves. I prefer to redirect these costs into each of my listings. For every listing whether it is valued at $500,000 or $5,000,000, I spend around $2,000 on brochures like this one, photography, videography, floor plan and 3D plan (Matterport).
For every sale, whether it is a listing or a sale representing a buyer, my brokerage charges me a fee of around $350.
Of course there are other costs just to get set up as an agent. A professional biography video (like this one) can cost up to $5,000 and to have your logo, branding and website designed can cost another $5,000. These costs can come up every 4 or 5 years to keep the marketing current. You will also have costs related to getting licensed. It will cost you around $1,000, assuming that you don't need to take a class and you are self taught.
You will also need to buy / lease, insure, fuel and maintain a car. You see many real estate agents driving around in $100,000 cars. For myself I drive a Mini Cooper which is pretty economical.