Well, you should be aware that the letter "d" actually stands for "would". In this particular case it's short for "I would" i.e. the full sentence would look like this - "I would like a beer". It is used in informal occasions/conversations, so its form is shortened to "I'd". Just like "it is" is shortened to "it's", "you have" to "you've" and so on.
Jordan explained the alternatives you've mentioned, but "d" is there for good reason and is necessary in order for the sentence to make sense in this situation.
Better? :)