A dependency indicates that one model element (source) depends on another model element (target), such that a change to the target element might require a change to the source element in the dependency.
In a class diagram, you can model dependencies between classes and between packages.