Ok first you need to choose a good pokemon... check it's base stats, weaknesses, moveset. After that you need to think which stats you want to EV train(these are normally 2 of the stats that have the highest base stat. Example: Porygon-Z has an awesome sp. attack and speed so it's good to EV train it in sp. attack and speed). Also you need to have a good nature for the pokemon, example: if you EV train a porygon-z in Sp. attack, it should have a nature that increases its sp. attack, like modest.