Process is similar to but not the same as drywall -- you patch with the material similar to what the surface is made of.
In my case, I had to patch holes made by an electrician hunting between consecutive ceiling joists for active wires. The electrician used a hole saw so I had the discs to put back in, albeit now slightly smaller. If you're just repairing a hole without the original piece, you'll need to make your own shapes to fill using a similar material of identical thickness.
How to attach it? Rather than cut further through your surface to find a stud or joist to attach a new piece of wood to, consider just attaching another piece of wood "behind"/inside the surface, and then just attaching your replacement plywood to that.
Depending on the size of the hole you're repairing, you may need a thicker/stronger piece of backing wood. For my 6" disc holes, I used 1/2" thick x 3" wide x (disc diameter + 3") long pieces of wood. I used a table saw on a 2x4 to cut the strips, then a mitre/chop saw to cut to length. If I didn't have those saws, I could've used painter shims as a stand-in.
Some people will tell you to use screws to attach everything - the backing wood behind the surface, and your replacement surface itself. This generally works for drywall because the screw can pull itself through the material a little bit and sit flush with the drywall. This is important because you need to eventually sand the surface as flat as you can make it. Plywood is tough and unfortunately doesn't work that way -- usually you're going to need to counter-sink the holes to get the screws to sit flush.
The more holes you have to make, the more work you have to do.
Alternatively, just use construction-grade adhesive. Any hardware store will have tubes of the stuff, fits right into a caulking gun. Glue the backing piece(s) behind the surface first, wait for them to set. Depending on the orientation of the surface, you might be able to get away with gluing your repair piece as well. In my case, I was repairing a ceiling so I could only glue the backing pieces -- still had to make one hole + countersink to hold the repair wood in place. I could have also used glue to stabilize the repair pieces, in addition to the one screw. Remember: fewer holes == less work.
Lastly, you'll need to use sandable wood filler to fill in the seams around the edges of your repair piece as well as over any holes/indentations you made attaching it. Use a putty, spackling, or mudding knife -- or a flat-edged piece of wood if you don't have any of these -- to relatively smooth the surface, then sand flat, prime and paint as necessary.