How can I repair drywall where it was soaked by a leaking window?
Dry things out with fans to prevent mold. Standard joint compound softens when it gets wet, but it's not necessarily bad at that point. Once that's done thoroughly...
Cut away all loose material with a utility knife and scraping tool. Any tape that has blistered will need to be replaced. Cut it back to solid attachment.
Patch with joint compound and your preferred tape (where needed). Texture to match where necessary. 
Prime and paint.