Some very good advice already on here. I'd just repeat the importance of consistency and routines. Also very importantly, the little ones parents need to behave in the same way. I'd suggest not battling with her but calmly implementing the routine.
A routine we used was after tea, a bath, a drink, teeth, story and into bed. Sticking to that means she knows what to expect. If she gets out of bed calmly put her back, but don't talk to her, or even look at her. Even if it takes 50 times, keep calm and keep doing the same thing. You'll have to camp outside her bedroom door for a while but it will be worth it. She'll give up in the end as she'll be bored and tired. Most toddlers will try it on the next night just to check it wasn't a fluke but again, follow your own rules not hers. After a few days she'll stop.
If she gets up at night, do the same thing with her. The critical thing is keeping calm/boring and not interacting with her.