In order to get this achievement, you must beat every "optional" trainer in the game twice
(the ones with the crossed swords above their heads).
After battling a trainer, you will be able to challenge them again after a short time (unsure how long exactly, but it's on the order of 10 minutes -- the icon above their head will reappear).
Unfortunately, there is no way to know how many times you've defeated a given trainer. If you're not in a rush and don't want to have to run through every trainer to find which ones you're missing, I recommend making two passes through every new area and fighting each new trainer twice to avoid the issue.
If you can't figure out who you're missing, you can always brute force this by defeating every trainer until the achievement pops. Here is an excellent video guide by PrimeraEspada91 on YouTube that shows the location of every trainer in the game: