Imagine a thin piece of rubber secured to a metal or wooden board like the edge of a dustpan. Now imagine moving that dustpan very, slowly along a vinyl or rubbery floor. Sometimes the rubber on the dustpan will get caught and it so it appears to move in “jerks.” This is kind of what’s happening with tectonic plates. The earthquake happens when they suddenly “jerk” into a new position, essentially. Now in this case, it’s like the “floor” drags the rubber of the dustpan under a bit. Imagine doing this under water. When the rubber of the dustpan pops back up, it’s going to disturb the water. Essentially it forces a bunch of water upwards. This then recedes as a wave radiating outward. This is what happened in Japan and is how the earthquake produced the tsunami. It was doubly devastating for Japan, though, because the quake actually lowered the coastline several feet (i.e. Honshu sunk partially) so it made an already bad effect even worse.
It’s important to note that not all underwater earthquakes will produce a tsunami. There are essentially three basic ways that tectonic plates move in relation to one another that produces earthquakes: the either subduct (i.e. one moves under the other like in Japan), or they separate, or they rub alongside each other (both of the latter have happened along the San Andreas fault). In general, the first type is most likely to produce a tsunami, though in the latter one could be produced by the water “dropping” to fill in any new voids created by pulling the plates apart. It is unlikely that the sliding situation would produce a tsunami, but not impossible (e.g. if an underwater mountain were to move considerably in a short enough time span, it could trigger some kind of wave motion).