"Ahnung" is a difficult word to translate in itself (I tried it once ;) ), but as far as idioms go, all you need to know is that
"Ich habe eine Idee" = "I have an idea ( = a stroke of genius)" = e.g. I've just thought of a great way to solve the problem
"Ich habe eine Ahnung" = "I have an idea (= a suspicion)" = e.g. I can sort of imagine what it's like / what it's going to be; and "Ich habe keine Ahnung" = "I have no idea" = e.g. I don't know the answer to the question at all, I don't know anything about football at all.
So, the detailled meaning beyond the idiom would be this: the verb "etwas ahnen" means that you have a kind of premonition, a suspicion about what will happen: "Ich ahne schon, dass er wieder zu spät kommt" ("I already have a feeling he'll be late again"), "Ich konnte das doch nicht ahnen!" ("I couldn't have known (or suspected, rather) that!", i.e. that things were like this / that this would happen); cf. "Ich erahne seine Gestalt im Nebel" ("I can vaguely discern his form in the mist"). Along these lines, "die Ahnung" is, in short, a sort of premonition or suspicion, either of things being a certain way or of how things will be in the future: "Ich habe so eine Ahnung, dass wir heute gewinnen" ("I have a [gut] feeling that we'll win today"). In literature there can be a poetic connotation to it.