In neoclassical economics a worker is paid the marginal product of what they produce. If this is true then what is the source of profits?
Recall the profit function.
where $x$ is a set of inputs, and $w$ is a set of input prices.
A firm is profit maximizing when $MC=MR$ or in a competitive case where $MC=p$. If a worker is paid his marginal product (where $MPL=w$) we only pay what he produces.
If marginal cost is constant and marginal revenues are constant across all production sets, then the firms profits will be zero.
However if there are diminishing returns from the inputs then every worker is paid less, thus allowing for profits to exist in the short run.
Bottom line: In the short run, through the diminishing returns from labor that profit for the firm comes into existence.
In the long run however, new firms enter capturing more and more of the profits until they are reduced to zero.
Consider it intuitively. If each agent is paid the marginal product of what they contribute, then supposedly, the firm will also provide some value to a good or service that they will find a return on.
For someone like taxi cab drivers, they probably contribute most of the value of the service, (and pay for their own gas, upkeep, etc.). They end up getting paid close to the full value of the service, while the firm collects rents other ways. But if you are a car salesman, when you make a sale, you don't get paid the full value of the car that you sell. That's because sure, your labor contributed to the value of the sale, but so did the people keeping up the floor room, the advertising, etc. So everyone contributes some value to the firm, and presumably the firm itself will do so. The firm in this case may have put up financing for the dealership and taken on the cost of sifting through the labor market. So presumably the individuals in the firm will receive "profits" for these efforts as well.
Keep in mind that when we talk about zero economic profit in neoclassical economics, this does not preclude accounting profits.