You feed it a large input corpus and it digests it in clever ways. Then when you probe for something contained wholly within the space described by that corpus, it is amazingly good at fabricating something plausible to match the point in that space that you requested.
Which covers a lot of stuff and is very useful, but does very little for problems that require extrapolation. It can't expand the edges, it can't come up with anything truly original. It can't solve problems that people haven't already solved and written down the solutions somewhere the AI could find them.
Another way of saying it: AI today is much better at memory than thought.
Career advice for young people today: specialize in pushing the edges, not in filling in details. There will be some areas where applying existing stuff will hold out and be useful for a long time, but you'll always be racing against the AI. Colonize the parts of problem space where AI doesn't have the imagination to go.
(Of course, humans are notoriously bad at correctly recognizing what does or doesn't require originality. Hell, we think we're making decisions about what to do every minute of every day, when in fact we're just a bunch of dancing meat automata following ingrained patterns 99% of the time.)