When you edit a page, a temporary copy of the page prefixed by a tilde (~) is created, preventing the page from being edited by anyone else.
You must exit the editor using the in-editor close button [x], otherwise the temporary copy is not deleted and the page remains locked.
If you cannot edit a page, this is probably what has happened; you need to look for a file with the same name prefixed by a tilde (~), delete it, and publish the change. This will unlock the page to be edited.
See also: File locking and unlocking