I have a car that is garaged and not used much.
How often should I take it out for a drive and for how long each time?
I currently get it serviced every 10,000 KM.
This is quite variable - if you have a highly tuned car, it makes sense to drive it frequently to ensure oil covers all parts, as otherwise those tight tolerances add up to wear and tear, whereas a big engine that isn't tuned may cope just fine.
As an example: TVR's are an amazing English sports car, but they do have a stereotype which is that they always break down. And they do if only driven occasionally during the summer when the weather is nice. As a regular commute vehicle they last for ages and perform really well. Almost all of this is down to oil remaining on all relevant surfaces, the battery remaining charged, the cat not sitting corroding away.
Talking of the cat, when you do take it out for a drive make sure it is long enough to heat up sufficiently that no moisture can collect in the cat, as that is what causes most corrosion there.
tl;dr - not knowing your car, a good default is to drive it at least once a week, and go for at least 15 minutes. More is better.