General/public polling by news organizations and other groups, is ostensibly about trying to guess a race and present a story to the public. It can be cheap as hell - paying a call center to call a list of people and ask a few questions.
A lot of internal polling is about where to spend money, and so it's a lot more in-depth and expsneive, they know who they are polling, and it's not merely calling people on the phone - it can involve things like social media engagement (companies have databases of people in specific areas and what their social media accounts are, voting records are, etc.), things like yard signs in a given area, how meet-and-greets/local rallies are shaping up, the voting records of people in a particular area, demographics changes in that area (have 500 people moved into an area, how many moved out, etc.) etc.
For instance, if you see the Texas GOP is dumping a bunch of money into races in an area they would normally appear to have a lock on, that means their internal polling freaked them out. They try to spend as little as possible in the "safe" areas and save the rest for at-risk areas. And these days, they can really drill down on where to spend money, practically targeting small communities or small areas of a city or suburban area.
If some politician has a Facebook page or twitter, and they post some big news or an attack on their rival, multiple companies are trawling through all of the likes, comments, retweets/reposts, etc., and weeding out the bots and weeding out people who are not from within the voting area of that politician, trying to put together a picture of what's really happening.
If Ted Cruz posts something online, and 1000 people engage with it, the companies will see that 400 of those people are from out-of-state and 200 are bots and both groups can be ignored, but they'll look at the 400 remaining. If 300+ of the 400 remaining are anti-Cruz, it'll set off some flags and cause them to make some more posts ostensibly from Cruz, or they'll post comments and see what the engagement is.
People would be shocked at how much info companies can buy about them. Cambridge Analytica should have woken people up. And they'd be shocked at how much of what they see online is either auto-generated or meant to measure engagement/enthusiasm. There are plenty of social media posts "from" political candidates that were really created by the analytics folks to measure various things.