Let's assume you would like to purchase 100 shares of Company XYZ at $35 per share, and your broker charges a 2% commission to make the trade.
The shares themselves would cost $3,500 ($35 x 100 shares), but the broker would also need to be paid for finding someone to sell the shares to you. For their services, they would charge $70 ($3,500 x 2%). The total cost of the transaction would be $3,500 + $70 = $3,570.
Four months later, you decide to sell your XYZ shares. Now selling at $50, you would receive $5,000 ($50 x 100 shares) from the sale. But once again, the brokerage would take 2% ($100), so the actual proceeds from the transaction would total $4,900 ($5,000 - $100).
Although most investors would calculate the profit on the Company XYZ investment as simply the difference between $5,000 and $3,500 (or $1,500 -- +42.85%), the savvy investor takes commissions into account and knows that the actual profit is $4,900 - $3,570 = $1,330 (or +37.25%).
Stock brokers most often come to mind when discussing commissions, but commissions are the major means of compensation for real estate agents, financial advisors, investment bankers, and many others.