Magic interview question

How chatgpt is structured? And hows does ai works?