They are made of the same ingredients and are incredibly similar. The differences are that a jam is typically thicker and a compote thinner (saucier). Also jam is mashed to break up the fruit while a compote is typically left whole (or large chunks) that cook down without mashing.