They use metadata.
In essence your online presence (plus your mobile phone). It tracks your google searches, your likes on facebook, re-tweets, likes and quotes on internet forums, pages visited, cookies, GPS and health data from your phone, where you use your credit cards and travel cards (and what one), travel bookings, biometric scanning from cameras, medical information etc etc.
The same stuff that tailors advertisments to you when you visit sites. Only much more detailed.
Once they have that informaiton, they can use it to deduce an amazing amount of information about you from what political persuasion you are, where you work, what age you are, what your hobbies (and fetishes) are, your sexual preferences, what links you follow, what links you dont etc etc etc.
In essence you have a psychological proflile based on your online presence. They know who you are and what buttons to push, and what your likely response is going to be.
Once that's determined, they find a target demographic thats meets the critereon they are after, and push both real news and 'fake news' (even absurdly obvious crap like Pizzagate, or Clinton secrety dying and being replaced by a body double was another; there were also fake accounts on Breibart and so forth) into the public arena, ensuring that it comes across people thar are likely to spread it (and discuss it) virally on social media. These memes then get a life of their own. They engender even more discussion. The bullshit influences voters (in these demographics, and with certain voter profiles) to vote in a certain direction (or not vote at all).
I was reading an article about it the other day. It was fascinating (and horrifying) reading.
Thats a subtle way they can influence elections. There are other (more direct) methods.
Here is how easy it s using ONLY google search results:
http://www.mauldineconomics.com/outsidethebox/the-new-mind-control
Here is more info on it:
https://motherboard.vice.com/en_us/article/mg9vvn/how-our-likes-helped-trump-win
My ex mistress used to work for a big advertising compay in London, and they basically do the same thing (use metadata to tailor advertisments and search engine results to the correct demographic).
Scary shit.