AUI is the Atlassian User Interface library. It is open source; and provided both as a plugin for use in Atlassian products and a static file 'flat pack'. Note the flat pack does not contain those AUI components which rely on backend functionality.
Quick Start Guide - Static files
If you want to do quick prototypes or deploy AUI using static files, see the latest release notes for a 'flat pack' download. You can simply unzip the flat pack and get started.
Quick Start Guide - Atlassian Plugin
Most Atlassian products already provide AUI, ready for use. Check the version by running "AJS.version" in your browser console. If it is not available, you will need to refer to Adding AUI To Your Application in the docs.
AUI's own build uses the Atlassian reference application (REFAPP) for development and testing. There is a guide to setting up an AUI development environment in the docs.
See the AUI Contributor Guide for more details about contributing code to AUI.