Do you mean how to get rid of them? You need to go to the move-deleter.
If you comment on what game you are playing, I can tell you where the move-deleter is.
The Move Deleter is located on the east side of Canalave City, near the seaside.
In Pokemon Pearl
Hope This Helped :D