This is the subject of debate, but the easiest way to make a distinction is that hors d'oeuvres are always a precursor to a meal, while canapés can be either small bites before a dinner or a standalone meal in their own right.
Apparently, all canapés are hors d'oeuvres, while not all hors d'oeuvres are canapés – this is because, while they are both finger foods made to be eaten standing up while drinking cocktails (in an ideal world), canapés are technically meant to be the aforementioned topping on a base, while an hors d'oeuvre can be anything small served before sitting down for a more formal affair.