Ai is a broader concept. It encompasses brotherly love, motherly love, love between a couple. Koi usually describes love between a couple only. For example, your "first love" is "hatsukoi" and never "hatsuai". The terms are not usually interchangeable.