Outsourcing is the delegation of a function or department within a company, organization, or government agency to an outside firm. Outsourcing can be as simple as hiring an outside firm to perform cleaning or landscaping services to an office, or as extensive as hiring an outside firm to manufacture goods for a company.
Outsourcing of government services is often referred to as privatization. Outsourcing or privatization of certain support services within an institution usually does not result in job loss, and sometimes even results in additional jobs being created. Outsourcing is not limited to public or private businesses. US Federal and state government entities frequently hire contractors to assist them with their operations. Military contractors are a prime example of this, providing both supplies and services.  n the Comey FBI, outside contractors had access to the classified FISA database. Typically, certain restrictions and regulations are put in place to fill government requirements, protect human rights, and verify the integrity of the process.   
I The Internal Revenue Service has also outsourced some of their collections functions to a small number of collections agencies.  Outsourcing also has extended to the penal system, creating for-profit prisons. Some police departments have also begun outsourcing some of their operations.  In some areas where immediate response is required in the event of threats, some businesses and private individuals have hired private security firms.
In contrast, offshoring is an unpopular form of outsourcing where such departments are sent overseas, usually resulting in jobs being sent to another country. Donald Trump has vowed to make it more difficult for companies to offshore their operations. Sometimes outsourcing or offshoring is used as an alternative to lay offs, raise freezes, and other actions that negatively affect institutional support employees. Unions often viciously resist any efforts to outsource, even when outsourcing would be beneficial for the affected employees.