What is the catalyst necessary to transform into a titan? At first I thought that you must hurt yourself in order to transform into a titan. 

But later,


   We see that Reiner and Bertholdt transformed without self harm, because they transformed immediately after Mikasa cut them in episode 6 of season 2 (episode 31 on Crunchyroll).


Also, thinking back, Eren did not commit self harm when he transformed from within the belly of the titan in season 1.

We see also that sometimes Eren is hurt and he still cannot transform, even though the injury was self induced. What exactly must take place in order to transform?
As per Attack on Titan wikia


  In order to transform, a human with the power of the Titans must
  suffer an injury that draws blood (often self-harm) while having a
  solid goal or belief in mind at the moment of injury.


You can check when Eren was training with Levi in the castle, he discovered that only injury is not sufficient. 

when he transformed from within the belly of the titan in season 1.
In that scene you can find that all the above conditions are met.
1. Eren was injured( his hand was cut)
2. He has solid goal in mind. i.e to defeat the titan

You can read more cases/conditions in the wiki link I provided