Under appropriate conditions, superconducting electronic circuits behave quantum mechanically, with properties that can be designed and controlled at will. We have realized an experiment in which a superconducting two-level system, playing the role of an artificial atom, is strongly coupled to a single photon stored in an on-chip cavity. We show that the atom-photon coupling in this circuit can be made strong enough for coherent effects to dominate over dissipation, even in a solid state environment. This new regime of matter light interaction in a circuit can be exploited for quantum information processing and quantum communication. It may also lead to new approaches for single photon generation and detection.