I meant that if I'm at home say and she had a little screaming fit because she wanted something, that sort of thing, I would sternly tell her to stop, when she didn't I'd say 'that isn't nice, mummy doesn't like it' then put her down somewhere safe and I'd just walk out and stay in another room until she stopped. Then I'd go back in and say something like 'have you finished now? good, lets play with some toys' and then carry on like normal.
Out at playgroup, if the hissy fit was aimed at me, I do exactly the same. Just move her away from the others, explain that it isn't nice and then walk away from her, leaving her having a tantrum in the corner. After a while she would stop and then come over to play again and I'd say something like 'thats better, you were being silly, now lets do this puzzle' and carry on like normal.
If she hit another child, I would pick her up remove her from the others. Take her over to the corner of the room, get down on her level, eye contact and say very sternly 'we do not hit people, that is naughty'. By this age my DD could speak quite well, so I would then frogmarch her over to the child she hit and make her say sorry. If this resulted in more screaming, I do what I would normally do for screaming, take her away from everyone, stern voice etc.
It didn't work straight away, but by doing the same thing everytime she soon got the idea and the phase didn't last too long.
Of course, its horses for courses though and someone else will come on soon to say how they did it and that it worked for them. I think the main key is consistency.