When you disband the units that haven't finished their training duration you're compensated the initial cost of the units you recruited excluding the overhead.
However, when you disband units (that of course aren't training) on one of your outposts, camps or colony, you're compensated with only 1, 2 and 3 workers for infantry, vehicles and tanks respectively.
I hope I've made it clearer.
P.S: I think this topic shall be moved to the "Newbies Questions" section.
-George
-Edited!