It means someones who flatters an authority figure, by always telling him that he is right about everything. Whatever the leader says, they will say "Yes, that's a good idea."
In corporations and in government, bad leaders surround themselves with "yes men." "Yes, that's a good idea." They feed the leader's ego and make him feel good. It is always nice to hear that you are right and that everything is going well. Bad leaders will reward and promote "yes men." They will punish, demote, or fire people who tell them when they are wrong.
"Yes men" prevent a leader from getting accurate information, leading to bad decisions.
An old and formal word for "yes men" is "sycophant," "A person who attempts to gain advantage by flattering influential people or behaving in a servile manner."
Here's an example of use, from a book called "Six Men who Built the Auto Industry:"
"There was no one like him anywhere in the upper ranks of the global auto industry. He was an abuser of power, a despot surrounded by yes men when he ran VW in the 1990s."