A Comprehensive Guide to Explainable AI: From Classical Models to LLMs