At the end of a Sprint, a Story is either ‘Done’ or ‘Not Done’ in accordance with the definition of done.

If ‘Not Done’, then two options are on the table: 1) it goes at the top of the backlog for the Product Owner to reprioritization; 2) it goes to one of the upcoming sprints.