Summary:

In order to communicate with a city-state, you must find it first. When one of your units encounters a city-state, the city-state will tell you what type it is, and it will often give you a gift of gold as well. (This is another good reason to explore the world!)

Once you have met, the city-state may periodically make contact with you to ask you to undertake "missions". If you want to get in touch with the city-state, you can click on the city itself, or you can go through the Diplomacy Panel.