Apple do not recommend stacking Mac minis on top of each other due to heat issues.
Other than that, you can connect two Mac minis together via FireWire in one of two ways, the first being to start one of them in "FireWire Target Disk Mode" which turns it in to a glorified external hard disk for the other Mac mini, the second method of connection involves running TCP/IP networking over FireWire. As FireWire on the Mac mini runs at 400Mbps this would give a 400Mbps network connection between the two computers.
Simply connecting the two Mac minis together using either method does not instantly make them in to one faster computer. As another reply suggested the only way you can even come close to that would be to setup and run XGrid software on both which allows specially written programs to share the work between both. Photoshop, Microsoft Office, etc. do not count as suitable specially written programs.
VisualHub is a video transcoding application that is XGrid enabled, BLAST is a DNA analysis program that is XGrid enabled.
Frankly for two Mac minis it is just not worth the effort.