Identifying where exactly a Spanish speaker is from might be very tricky, but I can offer several important distinctions.
American vs. European
By European Spanish I mean the Spanish that is spoken in Spain. The standard European Spanish (the prestige dialect, the one most associated with Spain, etc.) is easily distinguishable from most varieties of American Spanish because it has the sound /θ/, which is like English th in thorn, and it contrasts with /s/. If you hear the z in zapato and the c in cerca pronounced like this, while the s in súper is pronounced differently, then the speaker is almost surely from Spain. In most of Spain, also, the /s/ often comes out with a kind of "whistle" or "rustle" (technical details aside).
Most American varieties of Spanish don't have this distinction, so the initial sounds of zapato, cerca and súper are the same: /s/. This /s/ is also pronounced differently; it sounds flatter, more like English /s/.
There are places in Spain (Andalucía mostly) where people do not distinguish /θ/ and /s/, and sometimes they only use /θ/ (but these are the minority).
Mexican vs. others
Standard Mexican Spanish has a particular rhythm. According to some it has taken after English in that it's stress-timed. This means that the time between stressed syllables tends to be the same, and the non-stressed syllables in between tend to get squeezed, their vowels shortened or dropped.
In contrast, other varieties of Spanish are syllable-timed: they have a more-or-less constant tempo, all syllables lasting about the same, and vowels are not consistently dropped or reduced.
Rioplatense vs. others
Rioplatense Spanish is spoken by many Argentinians and Uruguayans, not all around the mouth of the Río de la Plata, but along its tributaries and in the south of Argentina. It's very recognizable because its rhythm and intonation resembles that of (standard) Italian. It has a particular way of pronouncing the sounds written ll and y, with a strong friction (almost like English sh or French j), and it also employs voseo, whereby the second person singular pronoun is vos and the corresponding verb endings change. Even if you don't know these verb endings, you'll immediately notice that the stress is on the last syllable (over the ending) instead of on the verb root as usual.
Voseo is found in many other dialects but only in Rioplatense is it almost universal to the exclusion of other conjugations.
Andean Spanish is spoken by people mostly in Ecuador, Peru, Bolivia and northwestern Argentina (also parts of Chile and Colombia). One salient feature is that the rr sound (or r at the beginning of words) becames a voiced retroflex sibilant. This is difficult to explain, but you can hear it here (the singer says: «cantando al sol como la cigarra»).
Some dialects of Andean Spanish are also notable for pronouncing ll and y distinctly, which is not done in most other dialects.