A check is something that can't switch in (or if it can, it can only be on a particular move), but it prevents a threat from sweeping.
Example: Scizor is not a Terrakion counter, because it gets raped by both STAB moves. Barring the rare Babiri berry, Scizor's Bullet Punch is used to guarantee that Terrakion won't sweep you though and is known as a check.
Example 2: Scarf Jirachi isn't a counter to Dragonite, as Choice Band Earthquake or Fire Punch do a number to it. It can take at least one hit from any move though, and outspeeds it after a Dragon Dance and hits it with Ice Punch/Iron Head, so it is a check.
Example 3: Sash Alakazam can be seen as a check to Lucario, as it can come in after a teammate has fallen, take an Extremespeed and KO it. It cannot be seen as a counter though, as literally any move followed by an Extremespeed means that Lucario comes out on top.
People saying that Heatran is a check to Celebi is stupid unless you're talking about Scarfed Heatran, it's either a guaranteed counter (Earth Power-less versions) or it is not even a check, because no matter what it switches into it'll die to Earth Power the next turn. A non scarfed Heatran should be seen as a weak/shaky counter, as should similar examples of that nature.