Where is the rear wheel quick-release mechanism on my bike?
This is a standard quick release mechanism simply grab the lever indicated below and flip it the opposite direction (green arrow). At which point it should loosen up a bit, then you can spin it around to the left to unscrew it further. You do not have to take it all the way out, just loosen it enough to be able to slide the wheel out. You can also hold onto the silver knob in your second picture to help unscrew it, that is how you adjust the clamping force of the lever. 

When you have your wheel out to repair, be sure not to pull the brake lever as this will cause issues with your brake caliper as it will try and clamp down on the rotor which will not be there. 

When reinstalling be sure to pay attention to the rotor as they can sometimes be tricky to line up with the slot in the brake caliper. 

Also when closing the QR you should need to apply force from roughly the half closed position. Not closing the QR tightly enough, or not fully closed may cause it to open at an inopportune time resulting in possible injury.Thanks to @Alex for this addition.