The scholars unanimously agreed on the prohibition of abortion after the fetus is formed and the soul has been breathed into it. This is formed in the womb when the egg is fertilized by the sperm that penetrate through its wall, and the soul is breathed into it after four months.
Prior to that however, there is difference of opinion among scholars regarding the ruling on aborting it. There are those who permitted it and there are those who prohibited it. But If the termination occurred before this period of four month, what is necessary then is to seek forgiveness from Allah the Almighty, and repent to Him for this sin.
If the pregnancy is terminated at its inception then there is not any issue except to seek for forgiveness and repentance, but if after this period, the issue takes other dimensions.