It can be done in a variety of ways. The most common/simple is just back and forth messages in the forums. Each roleplay gets its own thread, and the players use that thread to post character interactions. That's how most RPs are done.
For some things, like two characters doing dialogue, I personally like to do something called a collaborative post. Me and the other player will use a google document to write out some back and forth dialogue exchange, and then post it into the thread as a single post after we're done. This method isn't as common and needs to be done carefully if the roleplay has multiple players/characters so it doesn't block someone else out of interjecting. But it can really make the dialogue flow better.