What do pills do?

On the wiki, it says you can get HP/Attack/Defense/Special Attack/Special Defense/Speed pills from the chef in Selene Town. What do they do? I wasted all my rare candies so I can’t get one.

they max out the EVs of the stat.

Okay thanks

Increase the EV by 252 that is.