When you first get a Pokemon through catching it in the wild or hatching it, it has no EVs. If you got it through a wifi trade, then there's a possibility it already has EVs. You can feed it EV reducing berries to reset its EVs, but you cannot check what EVs it has for sure.
Only when you battle with a Pokemon does it gain EVs. To work out what EVs you're gaining, go here, that's a list of Pokemon by their EV yield.
There are things that alter EV gain, like Pokerus and Macho Brace (doubles all EV gain, so if you were gaining 3 EVs per Pokemon, you would gain 6 instead), and Power items (add four to every battle won, regardless of what EVs the Pokemon would give; e.g., you're holding a Power Belt, and you fight a Jellicent, which gives 1 Sp. Def EV. The Belt will add 4 Defence EVs, so you will gain 4 Defence and 1 Sp. Def EV).
EV enhancing items