The definition of done applies to the scrum team during the course of a project. The definition is applied to every story as a way of determining if the story is finished. You won't have a different definition of done for each story, that's what acceptance criteria is for.
It typically exists for the life of a project, but as with all things scrum, the team can change it whenever they think it will help make an improvement in their process. For example, part-way through a project, they may decide to add new criteria or remove some existing criteria depending on the needs of the team and the product.
The definition of done is simply an agreement among the team about a common understanding of what "done" means. For most teams it's some combination of factors such as:
- Unit tests have been written "X% code coverage
- All new code has been reviewed
- All acceptance criteria have been met
- Builds are passing in CI
- All functions have documentation
- Release notes have been updated
- Product owner has reviewed the functionality
- User guide has been updated for all user-visible changes
- ... and so on.
Some will say the definition belongs at a higher organizational level than the team. For example, a project may require multiple teams to complete and thus have an organization-wide definition of done. The teams can share a definition of done, and almost certainly do share some aspects of the organization-wide definition, but scrum exists to empower the team, so the definition of done ultimately belongs to each team.
To answer your specific questions:
defined in general for the project?
It can be, especially if several teams are working together for a single project. However, each team has the opportunity to adjust it for themselves (eg: by adding more strict criteria). In my experience it's typically defined for the life of the team, though they may adjust it for the varying requirements of different projects.
defined per sprint or per increment?
Typically not. The definition of done usually exists for the life of a project. However, as with most things related to scrum, the team can change it if they think that is necessary.
In my experience, it is usually defined at the start of a project, or even earlier if the team is formed before the project starts.
defined per story?
No. Acceptance criteria are defined per story. The definition of done will usually include something along the lines of "all acceptance criteria has been met".
defined per backlog item?
Again, no. The definition of done is irrelevant for something that isn't being worked on.