Mostly it's practice... You flip the quick-release on the brakes, make sure the chain is on the smallest (highest) cog, and then flip the QR for the axle and give the wheel a whack with the heel of your palm.
It should pop right out.
When replacing, hold the DR extended with your thumb while you position the chain on that same cog, then a quick lift and it should slide into the dropouts. Don't forget to close the QR on the brakes....