Well, first of all, no Pokemon can max all of their stats. I think it's only possible to absolutely max two stats: HP and whatever stat your Pokemon's nature raises. The nature of a Pokemon is that 'Jolly'/'Serious'/'Adamant'/etc personality that they have. There is a list of what stats those natures affect in Serebii's Ruby and Sapphire section. Then EVs.. to max a stat you'd need to put 252 EVs into it to get maximum benefit from those (a stat cannot get over 255 EVs in it, but since the benefit only happens per 4 EVs, 252 is a better number), but you only have an allotment of 510 EVs, so you can only put max EVs into two stats. Then there's IVs, a Pokemon's genes that are not changeable at all. They go from 0-31, 31 being the most benefit to that stat. High IVs are generall obtained by breeding parents with one or more good IV(s) with another parent who has one or more good IV(s), so that the baby has a chance of inheriting multiple good IVs from the parents.
The thing about Pokemon is that you need to focus on only a few stats, and try to get those stats as high as possible. It's quite complicated when you're just getting into it. Have you ever been to smogon.com? I suggest you take a look if you're really interested in competitive battling.