I highly recommend using this site to improve. Here's a few reasons why:
- It is very popular, so you'll (almost) always get someone to battle with
- You are battling real people, so you get great experience.
- You can save your battle replays to analyze them for later
- Team making is very, very easy. You can add any EVs and IVs at the click of a button, so you don't have to waste any time at all.
- It's completely online so you can use it anywhere
- You can save your teams too.
You can use this to test out your teams that you have made, and then train them in game to battle others over wi-fi. So, you don't have to make a team based off the only few trained Pokemon you have, but instead selectively train those that you know are excellent for use in battle.
As for how to make teams, there is no fixed formula. Generally, teams are either defensive or offensive. This is defined by the 'cores' of the team, which are 2-3 Pokemon which complement each other wither offensively or defensively. They have good synergy, counter each other's threats all the while either damaging the opposing team or supporting the Pokemon on your team that do. There are many, many good cores you can look up online like here.
Again, cores are not a must, but certainly you out. Alternatively, you can just mash up a bunch of Pokemon that good in battling (i.e., used more) and stick them in a team and make changes by trial and error. Now for this you need a bit of knowledge of tiers, etc.
In case you want to start from scratch, the DB has a specific place dedicated for exactly that, so you can check that out.
All in all, it's a bit complicated, but both reading up about it and having as many battles as you can (courtesy PS! ) wil help you out a lot. Once you gain proficiency there, you can use your new skills in the games.
Part Two:
Before fizz's edit, your question was with respect to Mawile, which you EV trained. I don't know if I'm allowed to answer that, but, if you still want it:
Mawile by itself is not very good competitively. Mega Mawile on the other hand was pretty overpowered at first, but is still a force to be reckoned with. Using Swords Dance + Iron Head / Play Rough / Sucker Punch is the go-to moveset, and for good reason. It does well with support in the form of Steal Rock and Spikes, as well as Pokemon that can take care of counters like M-Venusaur and Specs Keldeo, etc.
There is one more another important resource: Smogon. As a site dedicated specifically to the meta game, it is invaluable to all competitive players and has tons of relevant stuff to help you out. Definitely give that a go.