Three very different registers: (1) military — 'to fire a cannon'; (2) Peking-opera tradition —
打炮戏 is a star's debut performance, a 'cannon-shot' opening to launch a tour; (3) crude slang — 'to have sex', extremely vulgar, do not use in polite company. Context disambiguates, but the slang sense dominates in informal speech, so be careful.