A component diagram shows the structure of the code: the dependencies among software components. Components can be source code components (java, h, cpp, ...), executable components (exe, ...), libraries (dll, lib, class, ...), etc.
A component diagram is a graph with
There are component types and component instances. Component diagrams only show component types; deployment diagrams show component instances. A component type represents a piece of a system's implementation; a component instance represents a run-time implementation unit.
Possible stereotypes for components: file, page, document, library, static library, dynamic library, ActiveX, Bean, application, image, database, table, ...
A dashed arrow from A to B means "A depends on B." That means B must exist for A to be complete. Or, if B changes, then A might have to change also. You can also show dependencies on interfaces: