In a single instance (or cluster) of EPP, multiple portals can be running and share resources with other portals with two level of granularity:
Portal Containers: A portal container can host multiple sites, and an EPP instance can host multiple portal containers
Site: A site can have a unique identity, with its own skin applied to a set of pages.
The biggest granularity is what is called "Portal Containers". A Portal Container can host multiple "Sites". Those two components have a unique identifier that can be found in the default URL mapping according to the following scheme: http://localhost:8080/<portalcontainer>/<site>
When creating a website, it is possible to create a portal container from scratch or extend an existing one. It is then possible to extend the portal container which is accessed at http://localhost:8080/portal on the out of the box solution, this is the recommended way. While running multiple portal containers is possible, it's usually better to keep those on separate installation. Note that multiple websites can run in a single portal container and share some services.
By providing an extension you can benefit from the portal provided by EPP and be able to customize the parts you want. The benefit over directly modifying the shipped files is that it will make the updates much easier (by just replacing the archives provided by EPP).
A portal extension is packaged as an Enterprise ARchive (EAR), a configuration file allows to define which services are required and by ordering those, it is possible to modify some elements. It can be a configuration setting, a translation, a visual template, a page to add.
Portal extensions can shadow existing services, a portal will usually be composed of various extensions, which usually add services.
In a portal extension, elements are shadowed by using the same directory location, so if one wants to rewrite the groovy template of the HomePagePortlet which is located in gatein.ear/02portal.war/templates/groovy/webui/component/UIHomePagePortlet.gtmpl, it would be in an extension at a location such as myExtension/myWar.war/templates/groovy/webui/component/UIHomePagePortlet.gtmpl. The ordering will be defined by the portal extension configuration.