This is more of a behaviour issue than a sleep issue directly.
Like all toddler (and teenager!) behaviour issues, it needs you to be very clear in your expectations, very consistent in applying those expectations and make sure it is totally understood that your expectations are never negotiable.
It helps to take a similar approach with all aspects of the toddlers life, not just sleep. Firm boundaries are really important at this age and if you have a less firm approach generally, it's reasonable to assume toddler will think he can similarly expect that boundaries wont apply to bedtime.
Think up a mantra that sums up, in the simplest sentence, exactly what you expect. For example "At sleep time you lie down quietly in bed". That sums up the expectation that (a) sleep time is when you say and is not optional (b) toddler is expected to lie down in bed, so getting up or even sitting up are not acceptable, (c) toddler is expected to be quiet. So no chatting, talking, conversations or shouting.
Set expectations throughout the day by talking about what you will expect at bedtime.
Give a countdown to bedtime, from about an hour beforehand every 10 minutes and then every minute or two when there are 10 minutes to go. Set your expectations at every reminder. State what will happen - we will go to your room, get in nightwear, read story, you will lie in bed quietly and I will stay upstairs until you are asleep. Keep repeating these expectations every time. Get toddler to repeat back to you, or ask what comes next?
Then have no wriggle-room at bedtime. Be kind and compassionate in your tone (don't make threats) but be very firm and do not accept anything less than your expectations. Get toddler to tell you what's happening next (should remember from your repeated conversations throughout the day).
Once you're at the point where he is in bed, continue with silent returns. Just back to bed, say mantra "sleep time now, we lie quietly in bed at sleep time, nan night" and leave. No other engagement and dont lose your cool or get cross. Be willing to invest the time in dealing with this, so dont get annoyed if you're still at it an hour or more later. Just stay calm, return to bed, repeat mantra, don't get cross or engage in any negotiations.