Each individual Pokemon comes with its own set of IVs (Individual Values) as soon as you meet it. They are randomly assigned from 0-31 to each stat. The higher the IV, the higher the stat will be. You can't really "get" IVs, you can only try and try to get pokemon with high IVs by chance.
EVs on the other hand, are gained each time your pokemon helps to defeat another Pokemon. Say your Charizard beat a Gastly, it will get 1 Special Attack EV. Each pokemon will give 1-3 EVs when you defeat them. Usually the EVs are in the Pokemon's top stat (Gastly's best Base Stat is Sp. Attack, so it gives off 1 Sp. Attack EV). Now, every 4 EVs in 1 stat will give you a "bonus point" in that stat by the time you reach level 100. So if your Charizard beats 4 Gastlys its Sp. Attack will be 1 point higher at level 100. You can get up to 510 EVs total but only 255 in each stat, so the most you can "boost" a certain stat is by 63 points. (255/4=63 with 3 left over).