Actually convert is better than composite. Composite is old and less flexible. The convert syntax in ImageMagick for a foreground image with transparency and an opaque background image would be
convert backgroundimage.png foregroundimage.png -compose over -composite result.png
You can also apply the same foreground image to many background images, if you put all the background images in one folder (say test1). Keep the foreground image out of that folder, unless its suffix is different from all the files in the folder. Then create a new folder (say test2) to save the results. Then use mogrify with alpha composition to process all your files.
cd path2/test1
mogrify -format png -path path2/test2 -gravity center -draw "image over 0,0 0,0 'path2/foreground.png'" *.png
Where path2 is the actual path to the given folder or file.
see http://www.imagemagick.org/Usage/basics/#mogrify and http://www.imagemagick.org/Usage/basics/#mogrify_compose
You can go the other way to put different foreground images onto a given background image, if you put all the foreground images into the one folder (test1) and do the following:
mogrify -format png -gravity center -draw "image dst_over 0,0 0,0 'path2/background.png'" *.png