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