Repository is a layer of abstraction for query construction. It is supposed to exist between domain objects and Data Mapper. As the name suggests, a repository behaves like a collection of objects in memory. Objects can be added and removed from the repository. Repositories should be defined only for aggregate roots.
Repository helps to separate query buildings from the domain layer. Because querying itself easily causes technical complexity, protecting the domain layer from it is a good idea.