A McGuffin could be a person, an object, or an event that characters of a story are interested in but that, intrinsically, if of little concern. For example, in Hitchcock's movie North by Northwest, thugs are on the look out for a character named George Kaplan. Roger Thornhill, an ad executive, gets mistaken for Kaplan and so he is chased instead. Meanwhile Thornhill himself tries to find Kaplan who doesn't even exist.
Hitchcock explained the term in a 1939 lecture at Columbia University: "In regard to the tune, we have a name in the studio, and we call it the 'McGuffin'. It is the mechanical element that usually crops us in any story. In crook stories it is always the necklace and in spy stories it is always the papers. We just try to be a little more original." (quoted from the OED)
Hitchcock borrowed it from a shaggy-dog story where a train passenger is carrying a large odd-shaped package. The passenger calls it a McGuffin and explains to the curious fellow passengers that it's a device used to catch lions in Scottish Highlands. When they protest that there are no lions in the Highlands, he simply replies, "Well, then this can't be a McGuffin."