What is her story of origin and why did she appear as one of the Mahavidyas?
I have discussed about the picture and iconography of the goddess in my another answer. It is well known that she is one of prime goddesses in the shakta tradition. She is one of the cosmic manifestation of parA shakti.
The most popular account of Chinnamasta’s origin appears in the Pranatosini-tantra. It states that the goddess Parvati, Siva’s wife, goes bathing with her two attendants, Dakini and Varnini. The two women are hungry and ask Parvati for food. She tells them to wait and they can eat once they are home. However, after further begging from her companions, the merciful goddess and Mother of the Universe, severs her head with her fingernails and her blood nourishes her attendants. Following this event, Parvati is henceforth known as Chinnamasta (Kinsley 1998:147). This origin story emphasizes maternal self-sacrifice in order to satiate her companions. Scholars note the interesting choice of blood instead of maternal milk for nutrients. The nourishment symbolizes renewal of the universe (Kinsley 1998:150).
Public and private worship of Chinnamasta is not very popular due to her aggressive nature and worshipping her is viewed as dangerous. It is said that those who worship her are of three types: yogis, world renouncers, or heroic in nature (Kinsley 1998:164). Tantric practices allow a practitioner to develop siddhis (supernormal powers) and achieve the ultimate goal of liberation. The Sakta Pramoda, Tantrasara, and Sri Chinnamasta Nityarcana outline the worship rituals for Chinnamasta. There are nine sections of practice prescribed by the Sakta Pramoda including visualized meditation, drawing of the yantra (sacred diagram), and explication of the mantra (sacred utterance). Source