Resonance in the context of AC circuits means there is minimal impedance in the circuit.
Impedance is like the total resistance: it consists of resistance and reactance, and both contribute to “impeding” the current in the circuit.
For the impedance to be minimised and resonance achieved, the reactances of the circuit must cancel out. Because the reactance of a capacitor and of an inductor are 180 degrees out of phase, it is possible for them to be numerically equal and hence cancel out completely. This leads to minimal impedance as it now has no added component from the reactances.