The difference between "everyday" and "every day" is quite simple, and there is an easy rule of thumb that people can use to determine which phrase would be suitable. In short, "everyday" is an adjective that describes something ordinary or commonplace, while the phrase "every day" means "each day." Confusing these two is a very common grammatical error, but it can usually be avoided.
It should be fairly easy to determine which of these phrases is correct once it's clear what each means; however, a writer can substitute "each day" and see if it works in the sentence. For example, if a person can't decide whether the "train passes everyday" or the "train passes every day," he or she could use "each" instead and say "the train passes each day." In this instance, the correct phrase is "every day," because it describes an event that occurs daily. On the other hand, "the passing of the train is an everyday occurrence," doesn't work as "the passing of the train is an each day occurrence."
Instead of using "each day," a person can also substitute "ordinary" in a phrase. A sentence like "I go to the grocery store ordinary" doesn't sound right, so it must be "I go to the grocery store every day." On the other hand, the sentence "a trip to the post office is an ordinary event" sounds perfectly normal, so the correct word is "everyday." By keeping the meanings of these terms in mind, most people find it extremely difficult to confuse them.
By being aware of the difference between the two terms, people may find themselves noticing them used incorrectly more often, especially in grocery stores, which are notorious for curious grammatical errors. Many people, including the highly educated, don't always think out the words and phrases they use, so this common mix-up may be found in newspapers and even books, despite the fact that these publications are routinely edited by a team of people to catch such errors.
Incidentally, the word "everyday" appears to date back to the early 1600s, when it was used to describe informal clothing, differentiating such clothing from formal clothes worn to church and major events. The sense of "ordinary" emerged around 150 years later, while "everywhen" and "everyhow" also experienced a brief period of popularity in the 1800s, but never caught on.