Apex class and the trigger cannot be edited directly in the production environment. It is usually done firstly in the developer edition or you can use either Sandbox org or in testing org. It is then deployed using deployment tools in production, and a user with Author Apex permission can only do it. On the other hand, Visualforce pages can be edited and created in a production environment and Sandboxes both.