Both forms exist, and as Dsgoo says, there are cases when the rules aren't always followed. In this case I would say that there is a slight difference in meaning between "en öl" and "ett öl".. "En öl/ölen" = When talking about a can/bottle/glass of beer "Ett öl/ölet" = When talking about beer as a general liquid or type of beer
Is this because the glass of beer is a "concrete" thing while beer is not? (even if it is a liquid?) Because i've studied that the -en words are related to something masculine, feminine or anyway "concrete" and i found out that some things (like sugar or wine) follows this pattern... Is this the reason or this is just an exception? :)
It's because 'en öl' is seen as 'a serving' of something. You can do the same thing with coffee to some extent, but not as much. But it's more like an exception than anything else, because this is only possible with very few words. You can't really talk about 'vin' or 'socker' in this way.
Kaffe in itself is an ett gender word, but when you are really referring to 'a cup' of coffee, you say en kaffe. The same goes for beer.
It's even possible to use both forms in the same sentence: Ölet är gott här, jag köper en öl. and Kaffet är gott här, jag köper en kaffe = 'The beer/coffee here is good, I'm buying a beer/coffee'.
This means we'll rarely say ett kaffe (since 'kaffe' in general is a mass noun when not measured in cups), which is why your friend thinks it sounds strange. Ask them how they say Thank you for the coffee.
It sounds like you want to point out that you only got one cup of coffee… also, we generally avoid using kaffen in the definite. We use en kaffe a lot, but kaffen very rarely, I think maybe it's because it's too small a unit. You often get påtår (a refill) for free in cafés, too.
It's usually said as 'oh' in normal speech, but the word on its own is 'okk' It's pretty much the same as in English.
If you enunciate each word, you would say beer and coffee (pronouncing the D). But if you say it at a normal spoken speed, it would sound like 'beer an coffee'. The hard letter at the end disappears.
I suppose patiently doing practice is the answer. I'm sure there are googlable resources for listening to Swedish as well. Don't be too discouraged, you'll learn with time and patience. I had the same problem with spoken Dutch for a long time, but once you get over the threshold, all that practice is immensely rewarding.