The User Story, as an item in your backlog, is a placeholder for a conversation. In this conversation, the Product Owner and the Delivery Team reach an understanding on the desired outcome.
The Acceptance Criteria tells the Delivery Team how the code should behave. Avoid writing the “How” of the User Story; keep to the “What”. If the team is following Test Driven Development (TDD), it may provide the framework for the automated tests. The Acceptance Criteria will be the beginnings of the test plan for the QA team.
Most importantly, if the story does not meet each of the Acceptance Criteria, then the Product Owner should not be accepting the story at the end of the iteration.
Acceptance criteria can be viewed as an instrument to protect the Delivery Team. When the Delivery Team commits to a fixed set of stories in the Sprint planning they commit to fixed set of acceptance criteria as well. This helps to avoid scope creep.
Consider the following situation: when accepting the user story the Product Owner suggests adding something that was not in the scope of the User story. In this case the Delivery team is in the position to reject this request (however small it might be) and ask the Product owner to create a new User story that can be taken care of in another Sprint.
Nomad8 provides an FAQ on Acceptance Criteria
Leading Agile on Acceptance Criteria