Blunt honest answer -- Time and patience.
She is at the age where the "terrible twos" raise their complex head. Her brain is growing at phenomenal rates - the biggest development since she was born - and sometimes she just doesn't know what to do with it all. Most kids (and their parents) go through this - the not liking "no", wanting their own way, and tantrums when they don't get what they want.
Like I said, her brain is growing and developing amazingly. She understands a lot more of what you are saying, and is beginning to understand that she is a separate entity and has her own desires, but she doesn't understand her emotions, and certainly doesn't have the language skills to explain what she wants. Which leads to lots of frustration on her part, and meltdowns.
First off, stay calm yourself. The more worked up you get about it, the more she will act out (any behavior you give attention to is likely to increase, what you ignore is likely to go away). Try to prevent unwanted behavior by catching her before it starts and distracting her to other things. If she is doing something she shouldn't, intervene, remove her, and try to distract her with something more desirable to you. She's really too young to understand time outs, and spanking will be more associated with the punisher than the misdeed.
Give her words to express herself. Say "I know you are unhappy about this" or "I can tell you're frustrated." She won't start using the words for awhile, but if you can say it for her it could help.
Kids are more likely to melt down when they are hungry or tired, so try to keep meals, snacks, and naps as consistent as possible. If you're going out, take a snack with in case you're gone longer than you expect.
Sometimes you just have to make sure she's in a safe location and then walk away. Let her scream for a bit. You don't have to let her hit people (or pets) or throw or break things, remove them from the situation. And sometimes you need to just hold her when she cries, hug her while keeping her from flailing around. (How do we tell when to do which? ... I'm afraid I can't answer that, just be calm and listen to your instincts)
And then you just have to wait it out. Some kids go through this stage really quickly (a few months), while others are there until past their 3rd birthday. I know that doesn't help you now, but knowing that it's normal and will pass should at list give you something to tell yourself when you have to walk away.