How are accounts assigned territories?

Accounts are assigned territories via the enabled territory field within the account form.  The system takes the inputted value and routes the account to the users assigned to that specific territory value.  If the system does not recognize the inputted value, the account is routed to the users assigned to all territory values.