In general, duh (pronounced DUH , prolonging the UH , pitching the voice a bit low, and inflecting it with an intonation of imbecility or sarcasm or both, depending on the usage) is a colloquial comment on one's (or someone else's) lack of knowledge or brain power. In the Homer Simpson cartoon, duh is spelled "d'oh."
Here are some usages:
1) It can be used as an epithet when confounded by new technology. For example, someone unfamiliar with computers looking at a user interface for the first time, might say "Duh" out loud and to no one in particular. In this usage, duh expresses the state of being "totally clueless."
2) A common use of duh is to confess an error.
3) Another common use is to suggest to someone that you are telling them something obvious, but you're telling them anyway because you don't expect that they are all that bright.
4) It's also widely used in personal home pages as a kind of self-deprecating introduction. Many Geocities pages contain at least one duh.