Depends on a few factors for me:
Was it ASKED for? Growing up I was upset people would not be honest with me when I asked things because I was a girl and gosh there's no right answer to "does this dress make me look fat?". So I have taken the opinion of if I ask I better take it kindly and consider their words because I ASKED.
How was it said? That said, if they were plan old rude and a jerk about it- I'm not gonna take it very well. I find manners to be important.
Are they honestly trying to help? some people say stuff to say stuff and no other reason. But if I think they are trying to help, I'll evaluate what I was doing to figure out what maybe they saw I missed. Even if the advice was bad they might be onto something that needs improving.
Do they know what they are talking about? Ok, real life here... a person tried to be polite and well meaning... and told me my son's autism was caused by eating bread. Now when something of that level happens I try to educate them (Since I did know way more than she did and she only read one book on the topic which was trying to convince people of the evils of bread). In that case the conversation did not end well because despite the number of books, articles, and professionals I talked to who debunked all that... she insisted she was right and I needed to take my son off bread now.
... we don't talk
- Last thing.... does it involve my kid or husband? Cause I'm more likely to get mad if you talk trash about them without being helpful or backing off when you realize I have research to the contrary.... but really I think that point is most any parent/spouse.