You can translate "a cup of coffee" as
en kopp kaffe or
en kopp med kaffe (
med = "with"). (source)
kaffekopp refers to a cup which is designed to hold coffee.
en kopp av kaffe, I believe that this phrasing would imply that the cup itself is made out of coffee. (source)