We have a two year old daughter who is the best thing that has happened to our life. But she is a two year old. We are still trying to get the best method that works for her, but this is where we are now and it is working well:
We try to get her to do something else. Ask her stop what she is doing and point her to something better.
Ask her to help me with something. This one works great! If she won't get changed for bed I will ask her to help Daddy get her changed for bed. She loves to help with anything.
Using a stern voice. When my wife fails to get something across and calls me to come and talk to our daughter she knows that I mean business. There needs to be a difference between your tones of voice. Not yelling, but the tone of your voice.
Holding her. If she is not listening then I will hold her till she gives me her attention. Then try steps 1 thru 3.
Time outs. This works very well and she is good at them. She stands in the corner for a period of time, depending on what she has done. We are lucky in that she won't get out of the corner till we tell her she can.
Spanking. Last resort. Only done once so far, and she hasn't repeated that mistake again.
One thing that I always try to keep in mind when I am disciplining my daughter is that I never do it in the heat of anger. If she has done something to make me angery, she ends up in the corner or sitting on a chair till I gather my thoughts and emotions. My wife and I are different in this. My wife tends to yell where it is rare that I will ever raise my voice. Yelling needs to be used only at the most crutial times when your child is in danger and you need to get their attetion. Yelling outside of that is usually counter productive and also it shows that they can push your buttons. Never discipline out of anger. If you are all red in the face, you take a time out before you deal with them. Discipline out of love not our of anger.
So far my daughter has progressed well. She knows when she is doing something wrong, she knows why she is getting disciplined (usually) and she almost always says sorry afterwards without being asked.
I hope that as she grows that talking with her will be all that is needed. She really is a well behaved kid and I hope she continues that way.