It often refers to arguing or pleading with someone, but it can also be used for other actions.
Here are some examples:
* "I tried to explain it to him until I was blue in the face, but he just wouldn't listen."
* "She begged her mother to let her go to the party, but she argued until she was blue in the face."
* "I've been trying to fix this computer until I'm blue in the face, but I just can't get it to work."
The imagery of turning blue in the face comes from the idea of someone getting so worked up and exasperated that they turn a bluish color from lack of oxygen.