ML, basicly. Statistics. They simply buy some 100k links on their own and will look for patterns. That's no magic at all, paid links are mostly spread unorganic an will leave patterns. Like where it's positioned, how it's described, when it appears, etc...
I'm pretty sure, you can build up a simple ML modell, that will detect it with a 3% error rate.
There are ML modells, that can predict a timeframe, where a person is likly persecuting a crime - I would say, getting patterns of paid vs unpaid links is kind of easy compared to this^^