From the Latin abortus, the past participle of aboriri, 'to fail'. While one can abort a project, a process, or a military op., these days abortion is used primarily to refer to the abortion of a fetus, especially an intentional and premeditated destruction of the fetus.
When an abortion happens naturally, AKA Spontaneous abortion, it is sometimes defined as 'a termination of a pregnancy at any time before the fetus has obtained a stage of viability'. What exactly counts as a 'stage of viability' is debatable, and is usually based on fetal weight or age. As premature babies are being kept alive at younger and younger ages, definitions based strictly on time of gestation or weight aren't as important as is whether the baby lives or not. These days the term abortion will usually only be used if the foetus is expelled from the uterus because it has already died.
If a distinction is made between abortion and miscarriage (and usually there is), 'abortion' can be used when the death happens before the fourth month of pregnancy, and 'miscarriage' for any thereafter. Alternatively, miscarriage can be used to refer to any and all spontaneous abortions.
Most of the writeups in this node are about medically-induced abortion, which can be split up into numerous categories; induced abortion (your basic medical abortion, AKA artificial abortion), therapeutic abortion (for the health of the mother), eugenic abortion (because the foetus has serious defects), criminal abortion (done illegally), legal abortion, and habitual abortion (usually defined as abortion over three or more consecutive pregnancies, AKA recurrent abortion).
You also have to worry about incomplete abortion, where not all of the associated membranes (abortus) come out; missed abortion, the retention of the dead fetus for two or more months after death; septic abortion, when the abortion causes an infection in the mother; and threatened abortion, a condition of vaginal bleeding which often foreshadows an abortion.
Even with all that medical mess to worry about, the most controversial aspect of abortion is moral. Lots of people get very worked up about abortion. My opinions are noded elsewhere, but I will attempt to give a very brief and impartial overview of the debate. There are two basic viewpoints on abortions, generally termed pro-life and pro-choice.
Pro-life: A moral viewpoint holding that medically-induced abortion is wrong. Pro-lifers may have a list of conditions under which abortion is acceptable, i.e. if there are severe deformities of the fetus, or if the pregnancy is the result of incest or rape. Other pro-lifers will hold that abortions are always wrong. This viewpoint is generally based on the idea that the fetus is a living human being, and that killing it is wrong for exactly the same reasons that murder is wrong.
Pro-choice: A moral viewpoint holding that medically-induced abortion is not wrong. Pro-choicers generally hold that the right of the mother to choose what happens to her body is the primary moral and ethical issue to be considered. Pro-choicers often believe that imposing your belief system on another's body is at best oppressive and at worst rape.