Replicators are pretty widely used by the time of Star Trek TNG, and with their ability to produce pretty much anything short of living tissue, it seems that it would be useless to build anything with factories or even to use people for QA testing. Instead, object which can be replicated are just "programmed" into the device, and thanks to the Federation's open-mindedness, this means that anyone can easily produce anything for free.
Therefore, factory/mechanical work seems obsolete for people to do, but what about what we call "service" jobs today? It seems that many of these would also be obsolete - just listen to how the Enterprise crew routinely address's the ship's computer. They generally get better quality responses than I do from real people in a call center!
We certainly already know that nobody "works" for money like today, but people on Earth have been shown living otherwise similar lives to contemporary times in prosperous countries. What do people do to keep busy? Is everyone a scientist/teacher/artist/writer/entertainer/starfleet officer?