Dude is a slang greeting term between men, meaning "guy" or "man." For example: "Dude! So, like, what's up?" It's been popularized by movies and TV shows, and has a distinctive whiff of American West Coast hippie culture to it.
In the American nineteenth century dude had another life as a term for a dandy — a particularly well-groomed and fancily-dressed young man. From this came the term of dude as meaning a big city dweller unfamiliar with the ways of the Wild West. When such types came out West to enjoy the rugged life, they stayed in "dude ranches," basically resorts or spas, not real working ranches, and the term is still around today.