Magic Interview Question

How chatgpt is structured? And hows does ai works?