Let's say I have a video and I want to put an explosion over it. I know how to do that, but how would I make the explosion move with the original video?
The original video does have natural camera shake.
In FCPX, moving an image up-down or left-right is called "Transform". Here's the page of documentation you need, along with instructions on how to access the Transform parameters. Chances are you will need to keyframe every frame to keep the two consistent. Chances are also that explosions don't last that long, so dropping 24-48 keyframes won't kill you.
Programs such as DaVinci Resolve have a motion tracker that can generate the stabilization keyframes. These keyframes can then be used either to suppress camera shake (probably not your intention--you want the intensity conveyed by a shaky camera) or impart the same shake to other frames, as "Trackers".