Unless you have a social policy that alters this, a specialist is just a regular citizen who consumes the regular two food and creates the regular one unhappiness, science and trade route gold. But instead of working a square, they work one of the specialist slots inside your specialist-enabled buildings (eg market, university, temple etc) and produce output and Great People Points appropriate to the building that they're in (a specialist in a university produces science and Great Scientist points; in a market they produce gold and Great Merchant points, and so on). There are so many slots for them because if you focus your strategy around specialists, they can become very powerful. In particular, they're generally most efficient if you focus all your specialists in a given city to the same specialisation, so having 4 scientist slots available can be quite valuable.