Can't use pills on my pokemon

When I try using a pill on some of my Pokemon, it just does nothing. I’ve already tried resetting EV’s and then trying to use the pill, but it doesn’t help

Try resetting the EV that you’re trying to raise as well. It also won’t work if the total EVs after using the pill will be above 512.

ok thanks it worked I just didn’t know how EV’s worked very well