Episiotomy is done at the second stage of the labor to quickly enlarge the vagina so that the baby can come out easily. It is a very sensitive surgery and is done with utmost care. It is only done when the vaginal opening is not sufficient for the baby to pass through. It is performed by the midwife and only when the situation turns critical.
This can be performed in two different angles and it takes at least two weeks to heal. It can be dangerous if not done carefully because the operated area is vulnerable to infections.
Here's the whole episiotomy procedure that will make your stomach churn badly