Floor mouldings and crown mouldings were originally all made out of heavy plaster or real wood. Then they were produced out of MDF or compressed sawdust. Now you can find them made out of plastics and drywall as well.
ProFlex is a rubber like moulding that is the champion at following curves, as you see in the first photo above. The most common use is for flat floorboards, but you can special order crown moulding that could follow the ceiling joint of this same wall.
When you have trouble attaching a heavy moulding to a ceiling, you could first install a nailing strip, a bevelled piece of 2x3. The backer can be easily attached to the ceiling joists and the moulding nailed straight into the backer.
However more and more mouldings are made out of very light weight materials, like polystyrene beads. The ones in the photos are made by TrimRoc and have a plaster finish ready to paint. These are not nailed at all but simply put in place with a coat of drywall joint compound on the two contact surfaces.
Some trim pieces are not designed to go all the way to the ceiling and one very impressive use is to put a rope light with a dimmer switch in the hidden hollow. This will shine up onto the ceiling giving a very subtitle and romantic light to any room. The hollow space of all these mouldings can also be used to hide speaker wires very efficiently, especially since the speakers are usually mounted high up on the wall just in front of the moulding.