The first tin cans held quite a lot more food than our cans nowadays, they were really a solution for feeding larger groups of people such as ships' crews or military units, or perhaps for the cook of a house with a large kitchen who wanted bulk ingredients.
Early cans such as those used for salmon by the Dutch navy in the late 18th century came with instructions that a "hammer and chisel" was to be used to separate the top of the can. As you might imagine this sort of effort was more than one might expect for a tin of something-on-toast and so canned food as a the convenience that we're familiar with didn't really catch on. The French solution of boiling foods inside glass jars was easier to operate and therefore more popular although clearly more costly.
The can skins themselves were also much thicker, the invention of the can opener that you mention comes at a time when can skins were becoming much finer - the can opener would barely have worked on most earlier, thicker tins.
Quick answer: early cans were avoided or opened using brute force, they were mostly used for bulk storage and weren't a practical solution for the general public.
Sources:
An introduction to the tin can, Historical Archaeology Vol 15 Issue 1, Busch J, 1981
Tin can archaeology, Historical Archaeology Vol 8, Ascher M, 1974