How to fit clothing rails into plasterboard to hold adequate weight?
Find your studs (a studfinder can be useful, else you can drill test holes). Mark your studs. Once you find one they should be about 16" or 24" apart from center to center (this is the typical US measure, internationally YMMV).

Mount your clothes rails by drilling your mounting screws into the studs. (make sure your screws are long enough to penetrate your clothes rail, the plaster and into the studs)

From Evil Greebo: "If the studs are too near the front/back of the closet, you can mount a cross brace on the wall of the closet. Firmly connect it to the studs, then attach your closet rails to the cross brace."