Some things which worked for us:
1. Often parents fall into the trap of asking our kids to do things instead of telling them. "Are you ready to go to the store?" "Are you ready to...xyz"... etc. It's a very well-meant mistake. Instead, embed the choice into the request. I like the phrase "it's time" and then giving a "how" choice. "It's time to wash your hands for lunch. Do you want to fly like a bird/play elephants/walk like a duck to the bathroom? Do you want the bar soap or the liquid soap?" Don't go overboard with choices, and only offer two choices at a time (blue or green, blueberries or bananas) but if you ARE going to present a choice, present it in *how* the task gets done and NOT the doing of the task itself.
2. Make connection before giving correction/direction. "I see you think the glass ball is very pretty. It's nice to look at. Let's put it in my hand, I'll put it on the shelf. Now we'll leave it alone." Try to meet the child in the moment. My son is seven and gets his head very deep into his activities: I find that if I ask him a question about what he's doing or pay attention to it for a moment (oh, tell me about your creation; that book looks neat--what are you reading?) he is able to transition more easily from his activity to what I need him to do. This works for little ones as well, I've found. You are entering *their* space, being respectful of their level of activity, and then they are often more receptive to "in a few more minutes we're going to" . I also find that using a timer for that last few minutes gives kids a nice cue that they need to finish.(If you think this is too much work, imagine being in the middle of cooking dinner and then your spouse telling you "go wash the car right now"... it's insulting and disrespectful of your own activity. Playing is *The* activity for kids. I respect that by first acknowledging what they are doing.)
3. Do things together. If you are giving directions for 'put your toys away', little ones need more help. I like to engage them in fun ways to clean up (you be the bulldozer and push the blocks to me. I'll be the crane and stack them. Let's drive the cars into their box, etc.) Playful parenting works well here.
4. If you have a runner, put your body between theirs and the door/potential running space.
5. Have the child repeat back the directions. "It's time to put your shoes by the door. Now say it with me : "I will put my shoes by the door"
6. "Show me how you...." Some kids LOVE to feel 'big', and show me directions can use that to our advantage. "Show Daddy how you can bring your bowl to the sink." or "Show me how you will put your shoes on. Which foot will you do first?" (*how* choice.)
7. With noncompliance at this age, I wouldn't do a full time out, but find a quiet seat somewhere and say "I need you to sit here until you are ready to do X"... and let them get up when they are willing to do what's necessary.
8. For visits at other people's houses, expect it to be a lot of work and bring a basket/bag of safe toys/books to play with. We did a long Thanksgiving afternoon at one home (Kiddo was 3) where there were lots of crystal/expensive items down low and yes, both my husband and I had to be on top of Kiddo to keep him distracted and refocused to appropriate activity. Some people will just expect their kids to mind them "or else", I find that a bit of proactive planning and understanding that kids NEED something to keep busy with has saved us on several occasions. We adults sometimes forget that some events are just flat out boring for kids. Taking a short walk outside with one parent when the child gets ants in their pants is a great idea.
I think it's important to remember that doing these things isn't necessarily catering to the child, but is respectful to the three year old level of ability to self-regulate and self-restrain. I might even sit myself between my child and the 'nice' objects, so as to be right there to help the child. I also liked what Peg M. had to offer in her reply. It takes a lot of work, but kids ARE a lot of work. Being consistent and helping them navigate their way through life is our job--it's hard, but informative and gives them good positive experiences if we do it right.