Acidity of terminal alkynes is due to the relatively high electronegativity of $sp$-hybridized carbon.
Electron-withdrawing groups (EWGs) attached to the system stabilize the conjugate base (acetylide anion) and increase acidity. Examples: -NO$_2$, -CN, -COOH, halogens (-I effect).
Electron-donating groups (EDGs) destabilize the conjugate base and decrease acidity. Examples: -NH$_2$, -OH, -OR, alkyl groups (+I effect).
Resonance effects (-R for EWG, +R for EDG) are often stronger than inductive effects (-I, +I) when groups are conjugated with the system.
-NO$_2$ is strongly electron-withdrawing (-I, -R).
-NH$_2$ is electron-donating overall due to strong +R effect, despite -I effect of N.