Large Language Models A Deep Dive Bridging Theory And Practice