This guide explains how to join an Ubuntu machine into a Microsoft Active Directory Domain. This solution uses the realmd and the sssd service to achieve this task. Other solutions for the same task, are samba + winbind, and the Likewise tool, which provides a GUI along with the command line utilities. The reason I choose realmd + sssd, is because this solution is better suited for complicated Active Directory infrastructures and provides more customization options.
The following instructions have been tested on Ubuntu Desktop 14.04 but they will most likely work on later versions as well.