1) Originally, “dude” meant a stuck up person who dressed overly well. It first emerged in the year 1883 in England.
2) Later it was used in the old west to mean a city person who moved to the west without actually know what he was doing. Synonymous with “city-slicker”
3) Later, in California, the term changed from these insults to a term meaning any male, human or otherwise. Sometimes it is used in reference to tom-girls. Now, it is often used for emphasis as well.
“Look at that rich fellow; what a dude! Do you see the feather in his hat?”
“What’s that dude doing in these parts? I bet he can't even ride a horse!”
“Hey dude, I missed you at the movies the other day!”
“Dude, that's harsh.”