"Turn that frown upside down" is a way of saying - don't be sad, be happy. Instead of having the corners of your mouth point down (frown), have them point up (smile). The joke is that if you move the eyes to the other side of the mouth, it remains a frown.
How interesting - I'm British, and I got the joke immediately. Yet, I'd hardly move my mouth if someone asked me to put on a frown. I'd never really thought about that one before.
The implication is that if you are sad there are more associated tells than just your mouth. Imagine a clown doing a mock sad face and exaggerating sadness by frowning.
I've always felt this was a forced contrivance and never that anyone literally thought frowning had anything to do with smiling.
"Turn that frown upside down" isn't a phrase that would make much sense to people who didn't hear it before. More so if English isn't their first language or they are neurodivergent.
I don't believe I have ever heard this phrase used IRL. It's not a very nice thing to say in most contexts (saying this to another adult is outright bad - which is what makes the IRC joke funny in the first place).