From an Islamic jurisprudence point of view, after an abortion, the type of blood observed will depend on the age and stage the fetus is in at the time of abortion:
First 80 days: Human-like features are not yet developed. The blood observed is considered istiḣāda (vaginal, non-menstrual) blood.
Between 80 days and 120 days: The soul is not yet breathed into the fetus, but the creation of human features may have begun; therefore, the situation is contextual. If the aborted fetus has developed human features, the blood observed is nifās (childbirth-related) blood. Otherwise, the blood observed is considered istiḣāda blood.
More than 120 days: The soul is breathed into the fetus; therefore, the blood observed is nifās blood.
When the blood observed is determined to be nifās blood, praying and fasting should be ceased until the period of nifās is over or the maximum number of days are exceeded (varies by school of jurisprudence). When the blood observed is determined to be istiḣāda, praying and fasting should be continued, while observing requirements of purification for istiḣāda.
The above is based on the following hadith (partially quoted) in Sahih al-Bukhari under the books of beginning of creation, divine will, and prophets:
عَنْ عَبْدِ اللَّهِ قَالَ حَدَّثَنَا رَسُولُ اللَّهِ ﷺ وَهْوَ الصَّادِقُ الْمَصْدُوقُ قَالَ: إِنَّ أَحَدَكُمْ يُجْمَعُ فِي بَطْنِ أُمِّهِ أَرْبَعِينَ يَوْمًا، ثُمَّ عَلَقَةً مِثْلَ ذَلِكَ، ثُمَّ يَكُونُ مُضْغَةً مِثْلَ ذَلِكَ، ثُمَّ يَبْعَثُ اللَّهُ مَلَكًا فَيُؤْمَرُ بِأَرْبَعٍ بِرِزْقِهِ، وَأَجَلِهِ، وَشَقِيٌّ، أَوْ سَعِيدٌ
Narrated 'Abdullah: Allah's Messenger ﷺ, the truthful and truly-inspired, said: "Each one of you collected in the womb of his mother for forty days, and then turns into a clot for an equal period (of forty days) and turns into a piece of flesh for a similar period (of forty days) and then Allah sends an angel and orders him to write four things, i.e., his provision, his age, and whether he will be of the wretched or the blessed (in the Hereafter. Then the soul is breathed into him."
— Sahih al-Bukhari 6594