QCD and resonance physics. theoretical foundations