This is a very complex subject called - among other things - freehand stereo. The solution will depend on how easy it is to find features (points, lines, circles etc) in your images and how many of those features are common between the images. And in how many images they appear. And how many images you have in all. And if they were taken with the same (or identical) camera. And if there are any objects of known size in the images. And if you know the distance and/or angles between the various camera positions.
If the viewpoints are densly spaced, you may want to apply the methods of the stereo from motion category.
In some cases, you may only be able to recover the 3D structure up to an unknown scaling factor, or up to an unknown affine transform, or up to an unknown projective collineation.
I know some open source code is available for such work, but I haven't yet done much research into it.
As Leszek wrote, this is a much more difficult problem than what you probably believe.
Ideally, you would get more than 2 images and use photogrammetry software to reconstruct a point cloud that later could perhaps be meshed into a 3D model.
Personnally, I have used PhotoScan and 3DSom depending on the object type. They both propose trial license that you could test with your images.
A 2D image is flat—it is lacking a 3rd dimension. You can however, open a 2D image in photoshop & separate objects into layers, then import that image into a compositing program (such as After Effects or Boris Red) and give the viewer an illusion of 3D.
You can also use MATLAB to concatenate four 2D images of the same size along the 3rd dimension, use: