Moonlighting is taking up side employment or extra jobs outside the working hours, without the knowledge of the employer.
Usually resorted to earn additional income. Popular in recent times due to WFH situation, where employees could resort to parallel jobs that provides for additional income.
Is it legal?
The factories act 1948 or shops and establishments act or the industrial employment central rules 1948, all prohibits workers from working in 2 factories simultaneously, because it might adversely affect the employer's interest.
But all these regulations are applicable for factory workers and not for employees in administrative, professional or executive roles.
But where an employment contract has provided for non compete or single employment or confidentiality clauses, then any violation by the employee, by taking up multiple employments at same time, can be construed as cheating.