I have created a custom button for creating a contract from an opportunity. I would like to hide this button unless the opportunity stage is equal to Closed/Won. Is that possible? How can I implement that? I have read about record types but, I do not really know how to apply it for this porpose. Thanks in advance.
Yes, this is possible through record types and page layouts.
To make this work, you will need at least two Opportunity record types, including one record type for closed/Won opportunities.
Create a workflow rule and field update to update the record type based on when the opportunity changes to closed/won.
Next, create page layouts and use page layout assignments by record type to dictate when the button appears.
Mike Gerholdt, aka button click admin extraordinaire, has written a blog post on extending this functionality throughout the sales process here: http://buttonclickadmin.com/monday-am-admin-the-goose-and-the-gander/