1. attempt to do something that is or seems hopeless
speaking to them is like banging your head against the wall
This idiom is mainly used to express frustration at one's fruitless efforts to do or achieve something, especially something highly unlikely, if not impossible. It emphasizes both your frustration and the pointlessness of what you are attempting and is particularly common in the context of trying (unsuccessfully) to get somebody else to do something. It is important to note that the failure to succeed associated with this term is usually not down to a lack of hard work or skill, as already mentioned; it is more about the impossibility of the task you set yourself in the first place. The term is common in both a social and professional context.