You can keep pimples from getting to large and appearing but I've never found a way to fully get rid of pimples and keep them away.
I apply both some cream for pimples and also apply some apple cider vinegar solution to my pimples when they start appearing.
Also wash your face daily as that's a good habit to get into.
I always wash my face every morning before work and when I get back home even after showering I wash my face and then apply some apple cider vinegar to my pimples to keep them from getting to large and they eventually go away even though they do come back sometimes.