The phrase "to give an opinion" means to share your thoughts on something. The joke is saying that people are often ready to give an opinion, and not all opinions are positive opinions. 
The hardest thing for a person to keep is his opinion