One single stat can hold a total of 255 EVs, and a Pokémon can hold a total of 510 EVs. A total of 4 EVs is needed to cause a point boost in a stat. Once a Pokémon has reached the 510 EV total, they will no longer gain EVs.
Certain Pokémon give certain EVs. For example, a Starly would give an EV in speed, a Sentret would give an EV in attack, a Seedot would give an EV in defense, etc. Some evolved species of Pokémon can give multiple EVs.
Combined with IVs and Natures, a tester can determine which Pokémon give off which EVs, and what EVs would be best suited to maximize the potential of his or her Pokémon. This is known as EV Training.