Fennel and caraway are relatives, but not the same plant. Fennel seeds have a flavor dominated by anise/licorice, where caraway is quite different, being dominated by other flavors. They also have subtle differences in appearance.
Cumin, anise, and dill are other look-alike seeds with very different flavors. Anise and fennel have very similar flavors, and can be substituted for each other. Caraway and dill are likewise similar in flavor. Cumin has a flavor different from any of the above. I am including pictures of fennel, caraway, anise, cumin, and dill seeds so you can see how similar they are, but also how there are subtle differences in shape.