If the menses lasted for over than 9 to 10 days, considered menstruation?
If the duration of the bleeding does not exceed fifteen days, it is all considered menstruation, even if the usual pattern changes.
What is the ruling on istibra' and how is it performed?
Istibra' (cleansing from urine) is recommended. It is for a person to ensure that nothing remains of urine in its passage before performing istinja'. Its method is: to clear the throat (or cough slightly), shake the penis (meaning to pass fingers along it to expel any remaining urine if needed), and walk a few steps to the extent that one thinks nothing of urine remains if walking is needed. Each person knows his own nature best. The preferred opinion is that this differs among people. The objective is for one to think that nothing remains in the urinary passage that he fears will exit later. And Allah the Almighty knows best.
What is the ruling on the cessation of blood after (40) days from delivery, but later continued sporadically during two days of Ramadan?
Once postpartum bleeding (Nifas) ceases, and the woman is certain that it won`t reoccur, then she becomes ritually pure and so she is free to make Ghusl (purificatory bath), pray, and fast. If the bleeding reoccurs before fifteen days from its cessation, and before the end of (60) days after delivery, then the ruling on postpartum bleeding is effective, and her fasting and prayer are null and void, thus she must make up the fasting that she missed and not the prayer during those particular days.
Is it a condition that a woman should untie her locks while making Ghusl (ritual bath)?
Ghusl from Janabah (ritual impurity), or menstruation obligates that water reaches the roots of the hair in order for the Ghusl to be valid, but if it doesn`t, then hair locks must be untied for water to reach them, and for Ghusl to become valid.