Heads up - if you're in a school, eventually everyone will know what you're doing as schools are a breeding ground for gossip and drama.
2nd heads up: If you have a crush on a boy and you want to talk to him, go ahead. It's a free country. You're allowed to say HI and How's it going to anyone you want. If mean girl finds out that you SPOKE to him, what's she going to do?
3rd heads up: If she wishes to start some drama over this, you can simply tell her that all you did was speak to him - say it nicely - not in a snotty manner and then be silent. You can nod and smile and say OK and then walk away.