ChatGPT consists of transformer (converting input text sequence to output text sequence e.g. by translation using dictionary), LLM (to predict a subsequent word give previous words), etc. It relies on supervised and reinforcement learning techniques.
https://novaapp.ai/blog/technology-behind-chatgpt
https://www.scalablepath.com/machine-learning/chatgpt-architecture-explained
https://youtu.be/lm_ZBWaK56k?si=I8P_btvKiCFwFL5G