When you deploying a UAG DirectAccess solution, the TMG firewall is automatically installed on the UAG DA server. You don't have to do anything special to make it work, as the UAG installation program installs TMG and also integrates TMG configuration with UAG configuration, as well as the UAG DA configuration.
However, if you want to "roll your own" and not use UAG, you can do that. The TechNet entry "Planning DirectAccess with Forefront Threat Management Gateway" at http://technet.microsoft.com/en-us/library/ee731903(WS.10).aspx gives you some background information on this.