A diagram is a drawing that shows the different parts of something and how they work together. If you follow a diagram for assembling bunk beds and finish with parts left over, you should ask for the top bunk, not the bottom one.
Diagram goes back to the Greek verb diagraphein, meaning "to mark out by lines," and a diagram uses line drawings to explain something. Electronic equipment comes with a long instruction booklet and a one-page diagram, and it's usually the diagram that helps most in connecting the device. A diagram can also be a complex drawing, like an engineering plan for airplanes. When you make a line drawing of your own, you can use diagram as a verb, as when you diagram a sentence.