How does photoshop blend two images together?

Can somebody please explain how Photoshop blends two images together so that I may reproduce the same effects in my application.