Fandom (A combination of Fan and Kingdom) is a term used to refer to a subculture composed of fans characterized by a feeling of empathy and camaraderie with others who share a common interest. It is usually a community that surrounds a tv show/movie/book etc. Fanfiction writers, artists, poets, and cosplayers are all members of that fandom.
Canon is the material (characters, settings, ect.) accepted as officially part of the story in an individual universe of that story. It is often contrasted with, or used as the basis for, works of fan fiction. The alternative terms mythology, timeline, and continuity are often used.
To provide an example, let's use Star Trek. The community surrounding Star Trek would be considered the Star Trek Fandom. Canon Characters for roleplay would part of the official universe...an example would be playing Captain Kirk or Captain Picard in a roleplay. Non-Canon or Original Characters (OC) would be creating your very own character to play within the Star Trek Universe.