The noun canon can refer to a few things, including (1) a code of laws, (2) an established principle, (3) a group of exemplary literary works, and (4) the works of a writer that are accepted as authentic. Cannon mainly refers to a large weapon that fires heavy projectiles. It has a few senses unrelated to ordnance, but they are rare. Unlike canon, it works as a verb, meaning, chiefly, to bombard with cannon.
Incidentally, the plural of cannon can be either cannon or cannons. Both forms are used regularly. The plural of canon is always canons.