In the earlier Sims games, idle conversation isn't automatic — you have to trigger it. Select the two Sims, then choose a Talk interaction from the pie menu and pick a topic. They'll stand and chat through it rather than needing to be seated or doing something else.
In The Sims 3 and 4, the same applies: use the Chat interaction and pick a subject, and they'll hold the conversation where they're standing. In Sims 4 you can also queue a chat and then cancel the next action to keep them talking.
If they keep wandering off, check their needs — a Sim with a low fun or social need will break off to fix it.