I only work collaboratively, as I can't afford to hire artists. I'm very up front about this. And if a project was picked up, the rights would be split 50/50.
As to how it works... well, sometimes it does and sometimes it doesn't.
A lot of projects fall apart and there isn't anything you can do about that. You just have to pick yourself up and try again.
Trust is important, I need to trust in an artist's ability to draw and they need to trust in my ability to write.
When things fall apart, it's usually because the trust isn't there.
The biggest problem I usually have is when an artist decides that I don't know what I'm doing and tries to change my script through the artwork. I once had an artist who 'loved' a project but tried to remove every element of satire, despite the fact that was a major part of the book.
If a collaboration isn't working out, it will become apparent. And if it isn't working out, you're best walking away and trying to find a collaborator who does trust in your ability.
It's also important for you to both behave in a professional manner. In the instance of a writer stealing an artists work? Well, that's something people are going to hear about. No one is going to want to work with that writer.
Likewise, if a writer is a professional, well, there are ways to tell that. Go look at what they've had published. Does it look professional or is it a mess? If a writer and artist aren't working well together, you'll be able to tell that based on what they produce.