Hardware Description Languages (HDLs), of which VHDL and Verilog are prime examples, are used for a variety of purposes related to the definition, design and verification of hardware systems.
To describe each purpose:
Definition
A behavioral model of a component or system. The response of the model to external stimulus defines a design, but it isn't required to be able to directly build (synthesize) hardware from this level of description. For example, you could have a VHDL behavioral model of a RAM component, useful for simulation, yet the actual implementation of the RAM may be independent, such as from a transistor-level layout.
Design
Used to directly control the implementation of the hardware. Most digital ICs are designed at Register Transfer Level (RTL), either in Verilog or VHDL. There are Electronic Design Automation (EDA) tools to synthesize and place and route these designs to implement them in a form that can be manufactured by a semiconductor fab.
Verification
To verify design correctness, the design is included in a "testbench", which also may include other components that the design would communicate with. The testbench would provide stimulus and check response, as TonyM described. The testbench and models of other components would be defined in an HDL, but it's not necessary for them to be synthesizable.