BK's answer about the various producer credits doesn't really apply to network prime time dramas and sitcoms.
Most of the people receiving credit for being producers are actually writers. A sitcom will employ about a dozen writers, all of whom punch up the script sitting around a table. In the credits, these folks might be called Story Editor, Executive Story Editor, Producer, Associate Producer or even Executive Producer. Most of these terms are meaningless, and credits are sometimes given in lieu of raises (or along with raises).
Then, there's sometimes a hierarchy. A "punch-up" writer may just be there on rewrite night. At higher levels, writers are sometimes involved in the casting process, or sit in the editing room. And there is someone in charge: the show-runner. He runs the show. He decides when the script is so funny it no longer needs punching up.
That's a delicate question. I've heard of show-runners who regularly kept the entire staff around the table punching up a script until 5 in the morning. Others quit promptly at 6pm. You'd think the number of hours around the table would have something to do with the quality of the final output, but it seems not to. The "all-nighters" were pulled by the staff of Newsradio, which wasn't as funny as Frasier, which rarely had to order in dinner.
The show-runner usually gets the credit of Executive Producer, but then, so do the creators of the show, who may be different people. The creators don't even have to be on staff, they still get their credits. And, increasingly in recent years, stars of the show have gotten producing credits . . . not sure whether this means they did any extra work or whether the show used the credit to massage their egos.
When I was a little boy, my father was a producer. And I'm still not sure what he did.