Yes, it sort of depends on where the ball is coming from, but I also don't think there's a rock solid answer for this because the shot is often improvised. I'll use that backhand motion described above sometimes (it woks), but I'll also occasionally turn to my right and hit the ball by tucking the racquet in behind me - I catch it after it passes across my mid section.
What's key for these shots is making a very quick move to get in position for either a forehand or backhand volley and watching the ball all the way on to your strings (at least try to). Your brain will actually do a pretty good job of getting the strings on the ball if you stick with it until contact.
If you can occasionally have a pal pepper you with rapid fire volleys (I'm talking quick successtion, but not bullets) you can really get comfortable with those quick reaction shots. I consider this drill to be as valuable as hitting the obligatory bucket of serves from time to time.