The instestines grow outside of the fetus--in the umbilical cord. At 10 weeks, they return to the fetus's body and get attached to their abdominal wall. Malrotation occurs when they turn the wrong way and don't attach. It's very common (1 in 500 births).
Sometimes it doesn't cause a problem. Other times it twists causing blockage or cutting off blood supply to the intestine. Seraph's heterotaxy probably helped cause her intestinal malrotation.
They'll tac her intestine to her abdominal wall. They also go through the intestine to make sure it hasn't attatched to itself. Because this surgery rearranges her internal organs (again), they're also taking out her appendix. Otherwise, her appendix would end up in an unusual place and appendicitis later in life would be difficult to diagnos.