The contracting company that wins a bid for a contract is the Prime contractor. Often times these companies will then subcontract out some of that work (and sometimes it's even required by the contract to do so) to other contracting companies which would then be the Sub-contractor. That's where the "Prime" and "Sub" lingo in re: to DoD contracting comes form.