Burnedout's explanation was very good. For Special Forces units, the organization is a bit different. The smallest organic unit is the Operational Detachment - Alpha, which normally consists of 12 soldiers, 2 x ea. of the 18 series MOS'es, 18B (weapons), 18C (demolitions), 18D (medic), 18E (Communications), 18F (Intelligence), one warrant officer, and an Detachment Commander (18A, typically a Captain although rarely a senior 1LT). Each Special Forces company generally consists of about 5-8 ODA's, in addition to one Operational Detachment - Bravo (where the company commander, typically a Major, and his support staff reside). A special forces group, headed up by a Colonel, generally consists of 3 operational companies plus one support company, which imbeds the support functions for the group such as motor pool, cooks, clerks, etc.
Special Forces units at any organic level (from ODA to Group) may by operationally subordinate to either Special Forces Command, or the theater commander, depending on mission needs.