29 views, not single reply ?
First thing you need to do is stop thinking in terms of file formats once the files are in photoshop they are all the same. The exception being vector vs raster. But in this instance the process is rteally the same so 6 on one hand a half a dozen on the other. Or as some would say Tomatoe, tomahtoe(mispelled on purpose).
The jpeg I would assume is the background image and the gif image is the fore ground object. Open the jpeg, and then place the gif file. As long as the fore ground object has transparency, your job is pretty much done. If not, then it will be up to you to mask what you want to keep vs what you don't and apply that selection to the foregrounds layer as a mask.
Google the net or skim the users manual for the keywords - mask, selections, quickmask, pen tool, paths. Each of these can in one way or another take care of your issue.
It would be worth your time to also go through the numerous videos about photoshop and see how its done.
Either go to adobe tv,
or one of the following web sites:
The exception being vector vs raster.
Not really an exception - they're all documents when they're open in Photoshop. In fact a document can hold both vector and raster information at the same time.
I know you knew that; I'm just trying to help clarify things.