A cupboard--pronounced "cubbard," but you probably know that--is specifically for storing plates, china, or items of food. It is usually in a kitchen or dining room. It often has glass doors so that you can see what is inside.
A closet is a tiny room. Typically it is just big enough to walk into, and when you are in it you are surrounded by shelves, or hooks for things to hang on. There are clothes closets, with hangers and shelves for clothing; "broom closets" that hold brooms, mops, and equipment for cleaning.
Google Images is often a good way to get the idea. And actually when I look at what Google is showing me for modern "cupboards" and "closets" I guess they more similar today than they were fifty years ago.
There is a famous nursery rhyme which stresses "cupboard" as a place to store food:
Old Mother Hubbard
Went to the cupboard
To get her poor dog a bone.
But when she got there
The cupboard was bare [empty]
And so the poor dog had none.