NaNH2 is a very strong base (the pKa of ammonia, its conjugate acid, is about 35) and will easily depronate a terminal alkyne (pK ~ 25), producing a negatively charged alkyne carbon (an acetylide).
The acetylide is a strong nucleophile and will undergo an SN2 reaction with the 1ºalkyl halide. (acetylide is also a strong base, so with 2º or bulkier alkyl halides, it will go E2 instead).
Finally, Lindlar's catalyst will reduce the alkyne to a cis alkene.