Summary:

If you're allied with a city-state, you'll get a stronger version of the benefits of friendship. In addition, the city-state will give you all of their luxury and strategic resources. Only one civilization can be allied with a city-state at a time - if multiple are eligible, whichever has the highest IPs gets the position.

Additionally, if you're allied with a City-State you can pay them to improve a resource, which makes the resource available to you. To do this, click on "Give a Gift" within the City-State screen, then click on "200 Gold - Improve a Resource". Select the resource tile you would like to have improved, and the improvement is placed immediately.