The term cupboard was originally used to describe an open-shelved side table for displaying plates, cups and saucers. These open cupboards typically had between one and three display tiers, and at the time, a drawer or multiple drawers fitted to them. The word cupboard gradually came to mean a closed piece of furniture.
A closet, through French from Latin clausum, "closed" began life in the 17th century as a small private room, often behind a bedroom, to which a man or woman could retire, for privacy, reading, or enjoyment of personal works of art: for this usage, see Cabinet (room).
Modern closets can be built into the walls of the house during construction so that they take up no apparent space in the bedroom, or they can be a large, free-standing piece of furniture designed for clothing storage, in which case they are often called a wardrobe or armoire. Closets are often built under stairs, thereby using awkward space that would otherwise go unused.