This is the intention of the pill but it often fails. As a backup it prevents implantation of the fertilized egg. This would be an abortion. How often this secondary action occurs is open to debate. But it is fair to say that the pill is abortifacient. I encourage more knowledgeable readers to make my statements more precise.
An IUD before sex prevents fertilisation and is not abortion.
The primary action of an IUD is to prevent implantation of a fertilized egg. The IUD is primarily abortifacient.
Ok! I was clearly unaware about the abortifacient action of the pill. So apologies for calling others misinformed, when it was actually me who was such. Regarding the IUD, from webmd’s website (a better source than planned parenthood perhaps?)
http://www.webmd.com/sex/birth-control/intrauterine-device-iud-for-birth-control
Hormonal IUD. This IUD prevents fertilization by damaging or killing sperm and making the mucus in the cervix thick and sticky, so sperm can’t get through to the uterus. It also keeps the lining of the uterus (endometrium) from growing very thick.3 This makes the lining a poor place for a fertilized egg to implant and grow. The hormones in this IUD also reduce menstrual bleeding and cramping.
Copper IUD. Copper is toxic to sperm. It makes the uterus and fallopian tubes produce fluid that kills sperm. This fluid contains white blood cells, copper ions, enzymes, and prostaglandins.