I work at the Corporate HQ of the world's largest staffing company.
Okay, if you get a job through an agency YOU don't have to pay any fee.
The company that hires you could be using the agency to "find" the person that they need to fulfill their position of need. So that company pays the agency a direct hire fee. These are perm placements.
You could also find a job through an agency that is temp to perm. Or a temporary assignment. Unlike what someone else said here these are not always "crap" jobs although they can be. A company needs a person just to fulfill a short term need and maybe you fit the bill. Or you could be assigned to work as a temporary employee for a certain term (3 months, 6 months, whatever, depends on the company) at Company B meanwhile you are actually an employee of the staffing agency. The staffing company bills Company B and the markup is usually around 33% (if the staffing agency is doing their job correctly) but can be considerably less if it's a large national contract.