If you badmouth someone, you say unkind or critical things about them. A good friend won't ever badmouth you behind your back.
When you find fault with a friend, you can either be diplomatic or badmouth her, taking out your frustration by putting her down. It can be tempting to badmouth someone you're angry or frustrated with, but it's never the best option. The word comes from the 19th century phrase bad mouth, "a curse or spell," which comes indirectly from West Indian and African languages.