This is how I understand it:
Developers are the ones who actually make the game, but they don't want (or don't know how) to do all the paperwork and other types of business that don't really deal with creating the game, so they pay a separate company to take care of all that. I guess publishers are like the middlemen.
Often publishers will fight with developers because publishers try to influence the game because they're trying to market it to a wide range of people, and developers just want to make the game they have in mind.