Does an airline have to pay the investigation team? For example the NTSB? And if Boeing or Airbus participate in the investigation, do they also charge the airlines?
In the United States, no, the airline does not pay the NTSB or the FAA for accident investigations. This is considered a public service and is paid for by tax funds.
That doesn't necessarily mean that they won't pay for anything. For example if the NTSB has to remove wreckage to examine it, they will often have the insurance company pay for the removal and transport. This is especially true in GA investigations where the responsibility for moving the wreckage (after the NTSB says so) is up to the owner/their insurance.
Whether or not Boeing/Airbus/XXX charges airlines would be another matter that is probably outlined in contracts between the airlines, the aircraft leasing company, and the manufacturers.
Note that NTSB may involve any number of parties, for example they would have Boeing for the airframe, GE for the engines, Honeywell for the avionics/sensors, and representatives from other companies/groups (like the Airline Pilots Association) as they see fit. NTSB has manufacturer representatives for the bigger parts, and may ask for additional help from other smaller providers. This is done under the NTSB "party system" which is by invitation and does not compensate the parties for participation.
So as far as accident investigation goes, no, airlines/manufacturers don't pay for that directly.
The OEM will have its own Product Safety organization, staffed with investigators and analysts, that participates and supports accident investigations with its own internal contingency budget. So when a crash happens, a team is formed with the Regulator (FAA), the Gov't Investigator (NSTB), investigators or representatives from the OEM, and investigators or representatives from the affected airline, with everybody paying their own way.