Inflating the vote can be accomplished by urging apathetic voters (including the deceased) to go the polls, by voter registration campaigns where transient populations (such as students or fruit pickers) can be registered to vote, by buying or coercing votes from persons who would not normally vote but who are nevertheless eligible to vote, by subverting voting machines (such as jamming an opponents ballot lever or button), or by subverting the vote counting process itself. Such efforts and campaigns can be quite sophisticated, involving court challenges and counter-challenges.
Deflating the vote can by accomplished by intimidating voters and preventing them from voting (such as by random violence near polling places or other forms of electioneering), by controlling the ballot counting process, by losing or misplacing ballot boxes, by disqualifying broad categories of votes on technical grounds (such as requiring signatures on absentee military ballots after they have been cast but before they have been counted), or by hacking electronic voting schemes to foul ballots by making them appear to select both or neither or unintended candidates. Identity theft is likely to become an issue in internet voting schemes, since obtaining public records concerning registered voters is almost as easy as casting a secure vote using someone elses identity.
Such methods are limited only by human ingenuity and chutzpah. History is full of notorious examples (including the Daley Machine in 20th Century Chicago, and Tammany Hall in 19th Century New York), especially (and ironically) in advanced democracies where such crimes tend to be noticed, reported and corrected. Although the penalties for getting caught may be severe, the rewards for succeeding are likely to be immense.