Americans call a generic metal container for food a "can" whereas Brits call it a "tin". (Both are short for "tin can".) A better example of food in cans is a soup can. Sardines, also, are in cans. (Hence, Cannery Row.)
Foil is a very thin flexible metal (typically aluminum) sheet and might be used for the top of a container. (The kind that does not require a can opener to open.) It is not a very sturdy packaging choice and so the rest of the container would not typically be metal -- I see it used for the tops of plastic containers (such as for yogurt). Not being sturdy is not a problem if the food contained is perishable, and thus not expected to be stored for long. Sardines would never be stored in a foil-topped can.
The one in your picture looks squat and wide with rounded corners at the bottom, making it look more like a "tub" -- but "tubs" (for food) are usually plastic (example: margarine tub). They often have foil or plastic lids.
The glass equivalent of a can is a jar. A jar that is tapered to a small opening at the top is a bottle. You also already know about cartons.
All of these are containers, and people refer to yogurt containers because they can't quite figure out what sub-category those belong in. (It's like with "parking structure" used to refer to a multi-level above-ground garage.)