The process whose specific outcome is the progression of the pupa over time, from its formation to the mature structure. The pupa is a dormant life stage interposed between the larval and the adult stages in insects that undergo a complete metamorphosis.