Please explain "The Empty Hearse" episode of Sherlock Series 3
So I just watched Series 3 Episode 1 of Sherlock again. The first time watching it, I did not quite understand what was going on with the "terrorist" situation that he had to deal with. I mean John and Sherlock go and find the bomb and Sherlock simply just switches it off, does that mean that whole thing was fake, and what about the guy who was in the hotel room setting it off. Could someone just explain what does that mean and what exactly happened.