He did two major things.
First, he relentlessly attacked the media ("fake news") and regularly called them out on false or misleading stories. (Then the media regularly complained about him eroding their credibility, without admitting that his criticisms were often valid.)
Second, he was incredibly good at manipulation. His signature move was to tell a big fat lie about an issue that he wanted everybody talking about and where his general position was a popular one. The media hated this, because their choices were to let him get away with the lie or to start a conversation about the issue Trump wanted everybody talking about. But then they let their hatred of him become so transparent in their coverage that it undermined their credibility.
The right calls it fake news and the left calls it misinformation. Everyone has a rhetorical mechanism for attacking stories they think are factually incorrect.