I think IM works best as a means of communication, at least as far as discussing and planning the story, because it's instantaneous. You can feed off each other's ideas and inspire each other.
In general, though, just be open to all ideas, be willing to compromise, and be able to give and receive constructive criticism - speak up when you're not happy with something and listen when your co-writer isn't happy with something. Don't be bossy, but don't let the other person have their way about everything and walk all over you either. Unless you agree on everything right off the bat (which is great if you do, but even two writers who are totally in sync won't always), it's a matter of give and take and finding the middle ground, which is usually the best.
I've found that it works best to plan the story out together before writing it, rather than just letting one person start and the other person pick up where they left off without any idea of where the story is going. A little planning keeps the storyline more focused and prevents writer's block because you always know ahead of time what's going to happen.
Hope that helps!