There are two ways to do a drywall patch. One is where you cut the existing drywall to about half the thickness of the existing stud.
The problem with this method is that the existing sheetrock is left on only about 3/4 of an inch of the stud. Especially if there was water damage, or old soft drywall this probably won't be long term and I don't recommend this method.
The best way to do a drywall patch is to add a "sister" stud.
See pictures below which shows the steps.
By the way, sheetrock and drywall are the same thing. Sheetrock is a brand that manufactures drywall.
Step One: Cut hole.
Fasten a sister stud to both sides of the drywall patch. Shoot some screws into existing drywall to make sure it is secure.
Make sure to screw the existing drywall on the 4 corners just past where the patch stops. Look at the 4 corners in the picture. It is important that the existing drywall is locked down tight.
When customers see the new studs in the wall I usually get a comment like this, "that patch isn't going anywhere."
I know it might seem a bit much, but there is no point in doing a job unless it is going to last for many years. Also it only takes a few minutes to install the sister studs so why do it any other way?
Using a screw gun, fasten drywall patch to the new studs.