You can also find an example of an AMP—including an ant build file—in the Alfresco SDK.
To install an AMP you use the Module Management Tool. This tool merges the AMPs you want to install with the alfresco.war or share.war file. It is documented here: http://wiki.alfresco.com/wiki/Module_Management_Tool