the drain pipes are leading down to the A pillars in the front and the C pillars in the rear, they are pointed outside the car, if you open your cars front door and take a torch to shine through the opening you will find a rubber funnel shaped item pointing down, the same is hiding behind the bumper sides in the rear.
Usually they clog up with dirt, if the pipes themselves are clogged then you buy cable wire for motorcycles clutches etc (usually called vespa clutch wire) and use that to unclog the lines, go very gently as you dont want to tear the pipes. Once the material is disloged pour some water to completely clean it out.
The rear ones are a bit tricky to get to but you can either poke the wire from the boot area after removing all the carpet/plastic padding or remove the interior roof liner.
not too hard of a job.
please dont make the mistake of using grease to lubricate the sunroof as it requires a lubricant paste that does not attract dust.