Bribe them....with a cookie.(Joke) Or just stay with them until they eventually fall asleep. Some toddlers just listen and will stay in their beds. Others may not. It all depends on the child...Changing what you should do.But one thing is always needed, Patience.
Buy them new, really nice pajamas, something they will really want to wear. Tell them these are "big kid" pajamas, only for kids who are grown up enough to sleep on their own beds. Don't let them wear them unless they are getting into their own beds.
Consistency. That is the answer. Decide yourself on the bedtime routine you'd like to establish and be consistent with it. Dinner, play, wind-down time, bath, bed. Children love consistency, because it soothes them and they like to know what to expect. It's hard sometimes, but pays off.