If a crown comes off or becomes loose it should be replaced quickly to prevent teeth from shifting. Sometimes crowns come loose because of the failure of the bonding agent or the crown was pulled off due to sticky foods like candy.
The tooth should be thoroughly inspected and X-ray taken to verify that no decay is present before re-cementation. In many cases the crown comes loose due to decay that has compromised the integrity of the tooth.
If decay is present or the structural integrity of the underlying tooth is compromised then the tooth should be prepared again and a new crown fabricated. Broken crowns in some cases can be repaired but may not restored perfectly, especially from a cosmetic point of view.