This chapter introduces cavity quantum optomechanics with levitated nanospheres with some emphasis on preparing mesoscopic quantum superpositions and testing collapse models. It is divided into three parts: levitated quantum optomechanics: atoms vs. sphere; decoherence in levitated nanospheres; and wave-packet dynamics: coherence vs. decoherence. It is first shown how the master equation describing the dynamics of a polarizable object in a cavity along the cavity axis and that of the cavity mode is derived. Optical levitation is also discussed. It is then shown how most of the decoherence sources in levitated nanospheres can be cast into a relatively simple master equation describing position localization type of decoherence. Such decoherence tends to suppress the centre-of-mass position coherences. Finally, a discussion of wave-packet dynamics is given, with the motivation of using levitated nanospheres for matter-wave interferometry, that is, to create macroscopic quantum superpositions for testing quantum mechanics in unprecedented parameter regimes.