To edit a page click the edit button at the top.
To edit a section of the page (see here.)
You can't edit protected pages or special pages. You can tell because if it's a protected page it will say View source instead of edit, and on a special page all it will say is Special Page.
To practice editing go to the Sandbox.
The bad news is that occasionally a Wiki Troll will deface a page. The good news is that any page can be reverted back to a previous version:
Simply click "history" at the top of the page you wish to roll back. Then click on the time and date of the archived version you want to revert back to. The page will appear with the version indicated at the top of the page, just underneath the page title. Next, click "edit" at the top of the page. Add a note in the Summary box that you are reverting the page because of a troll, and then click "Save page".