Structural architecture
As already mentioned in the comment by The Photon your compiler will not just create a NAND without you (or someone else) defining it somewhere. Every component has to be known, so there most likely is a file called nd2.vhd where you have a separate entity and architecture definition for the named component.
I assume this is some kind of exercise so this information might be just taken for granted and is not listed separately.