How do you know an error coin is legitimate?

First have it examined by an expert -- try taking it to a coin show and having it examined. Then, if it's a valuable error, have it certified by PCGS or NGC.