From what I saw on some documentaries over the years and heard from some musicians who worked with them over the years, I can maybe glue a bit together, but it's mostly heresy and my own opinion, and assuming what I saw/was told is actually correct.
Michael jackson was well known to have literally created all the parts of the songs he wrote, like the billie jean bass line and to have come up with the basic drum beat (not like it's complicated) for the song, and the main chords of the song's verses and choruses, all in his head and by singing each part to the musicians and to his producer.
Madonna probably did similar stuff but actually could get around a little bit on a couple of instruments, enough to show a bit of what she wanted, and no doubt used song examples and recordings to say, ok, take the bass part from there, the guitar from that line there, etc.
Their PRODUCERS, as is normal in pop music, transcribed that for the musicians and added other things as they went along. In jackson's case it was sometimes jackon who added things by demonstration again, and he was very picky. Madonna sometimes did that, and was very picky also, and even when she let producers add stuff or musicians add parts, she was often the one who had final say about whether those additional changes/parts were going to stay.
Bowie, on the other hand, was a passable keyboardist/pianist and guitarist, as well as an arguably decent sax player. On his earliest work he played all the parts himself, including percussion/drums and bass. So when he wrote everything, he means he wrote everything. Obviously his exceptional musicians would solo and add things, but only with his approval.
So I guess that's how it's done. There are situations though of course where singer songwriters bring in a bassist and just say, ok here's the guitar part, play along. And in my case, I worked with a singer songwriter as a band member for years and years, and pretty much wrote the bass parts, and she was happy about how that worked out.
That being said, I've found that most singers can play at least one instrument alright as a rhythm player.