2004 Chevrolet Cavalier 2.2L

I was changing the oil in my car the other day and when i took the drain plug off i noticed metal shavings where stuck to the plug what could be possible causes of this so i can correct the problem