A stalking horse is a candidate whose campaign actually advances the campaign of someone else. This can take the form of winning votes or delegates in a presidential primary, with the purpose or effect of advancing the candidacy of another candidate running in the same primary.
For example, the candidacy of Fred Thompson in 2008 was probably as a stalking horse for John McCain. Thompson received special promotion by insiders at Fox News as he entered the campaign late and reluctantly. During one of his promotional appearances provided by Fox News, Thompson made a humorous, offhand comment indicating that he did not think he would win the presidential election. Thompson then exited the primary early, but in the meantime siphoned off key conservative votes from McCain's rivals, which enabled McCain to win the key South Carolina primary. Thompson subsequently issued a strong endorsement of John McCain.
Rick Santorum was an even better stalking horse in 2012 than Fred Thompson was in 2008. Santorum, who had endorsed Romney in 2008, ran an energetic campaign that lasted only as long as necessary to block conservative rivals to Romney, while rarely criticizing Romney in a meaningful way himself. He stayed in just long enough to make it impossible for anyone else to defeat Romney, then abruptly quit with kind words for Romney, and then endorsed him merely a few weeks later.