The easiest route to getting a straight, vertical wall is to identify the furthest out studs and then shim out those studs that are not as far out. Similarly, find the area on each stud that is furthest into the room and then shim the recessed areas of the stud to match.
Shimming can be done using cedar shims, sold by the bundle in big box stores and lumber yards. They can be broken to get the right size and length and tacked in place with a stapler or brads.
Not every inch of the studs has to be shimmed. I would try not to leave a gap of more than about 12 to 18 inches though.
If there is only one stud proud of the rest, I might try to shave that down, but if there are several, proud or leaning, I would use shims.
Getting to 90 degrees is a bit tougher, and is usually only done if there are cabinets that simply must be flush with the side wall. More often the edge of a cabinet near an untrue corner stops an inch or two short of the adjacent wall and is completed with a trim strip.
If you need to get a perfect 90, you can use a framing square in the corner to see where the error is, and which wall needs to be adjusted to accommodate. If the difference is enough, you might even need to rip a thin shimming strip for each stud to adjust, or even sister a stud next to, but proud of, the existing studs as a nailing piece to hold the drywall (sistering is attaching a parallel board of similar size next to an existing board for strength or better positioning).