It means to do something intentionally that people don't expect. It isn't an accident--the person subverting expectations is usually trying to do something out of the ordinary.
So, if everyone thinks I will become a doctor, but I decide to become a painter instead, I am subverting their expectations.
It's more commonly used in art and entertainment. An action movie about cars and robots might subvert expectations and have a female main character. It's doing something different from usual, since most action movies are about men. A painter could subvert expectations by using unusual colors or techniques.
It isn't a very common term in everyday conversation, but it is really useful when talking about art and literature.
I hope this will help!