Summary:

Periodically, a city-state may announce a "mission" - perhaps it's being plagued by barbarians, for example, or its people seek knowledge of Natural Wonders, or perhaps they're being attacked by another civilization and they seek allies.

If you complete the mission before another civ does so, you'll earn Influence Points with the city-state.