What is subcontracting? What is labor-only contracting?
Subcontracting or contracting refers to an arrangement whereby a principal agrees to farm out to a contractor the performance or completion of a specific job or work within a definite or predetermined period, regardless of whether such job or work is to be performed or completed within or outside the premises of the principal.
On the other hand, as defined under Article 106 of the Labor Code, labor-only contracting, a prohibited act, is an arrangement where the contractor, who does not have substantial capital or investment in the form of tools, equipment, machineries, work premises, among others, supplies workers to an employer and the workers recruited are performing activities which are directly related to the principal business of such employer.
Is subcontracting allowed? What about labor-only contracting, is it allowed?
Yes, subcontracting is allowed by law. Indeed, an employer is allowed to farm out the performance or completion of a specific job, work or service, within a definite or specified period, and regardless of whether the said task is to be performed or completed within or outside its premises. 
On the contrary, labor-only contracting is not allowed and is prohibited under Article 106 of the Labor Code and the rules. This prohibition is for the protection of the workers as will be discussed below.
What are the conditions to be met to be considered engaged in legitimate job contracting or subcontracting?
The following conditions must concur:
(a) the contractor carries on a distinct and independent business and partakes the contract work on his account under his own responsibility according to his own manner and method, free from the control and direction of his employer or principal in all matters connected with the performance of his work except as to the results thereof;
(b) the contractor has substantial capital or investment; and
(c) the agreement between the principal and the contractor or subcontractor assures the contractual employees’ entitlement to all labor and occupational safety and health standards, free exercise of the right to self-organization, security of tenure, and social welfare benefits.
The absence of any of these elements results in a finding that the contractor is engaged in labor-only contracting.
In a legitimate contracting/subcontracting, the worker is considered the employee of the contractor and not of the principal-employer. If say for example the contractor does not have substantial capital or investment, which is the case in labor-only contracting, it will then be to the prejudice of the workers if the contractor cannot pay them their wages and other benefits which they are entitled to under the law. If labor-only contracting would be allowed, the law will be circumvented.
For this reason, a finding that a contractor is a labor-only contractor, as opposed to permissible job contracting, is equivalent to declaring that there is an employer-employee relationship between the principal and the employees of the supposed contractor, and the labor-only contractor is considered as a mere agent of the principal, the real employer. This way, the workers are protected.
 Section 3 (c), Department of Labor and Employment (DOLE) Department Order No. 174, Series of 2017, Rules Implementing Articles 106 to 109 of the Labor Code, as amended. Retrieved from https://blr.dole.gov.ph/wp-content/uploads/2018/02/DO-174-17-Rules-Implementing-Articles-106-to-109-of-the-Labor-Code-As-Amended1.pdf  Petron Corporation v. Caberte, G.R. No. 182255, June 15, 2015.  Consolidated Building Maintenance, Inc. v. Asprec, G.R. No. 217301, June 06, 2018.  Sec. 5, Supra, note 1.  Supra, note 2.  Supra, note 3.  Allied Banking Corporation v. Calumpang, G.R. No. 219435, January 17, 2018.