You train them for a specific ability in a controlled environment that reflects deployment environment and after that the deployed system no longer has an ability to learn and will just fail if the environment is different.
Journalist in particular seem to be blissfully unaware of this distinction and always cast "artificial intelligence" as following similar mechanics then human brains.