You can easily make stuff float on photos by searching for a stock image, cutting the object and pasting it in a layer of your psd file. There are millions of drawbacks in using that technique, being the correct lighting and the getting the exact object the main ones.

In this video tutorial by Patrick McKinnon, you will learn, in detailed steps, how to make a photoshoot of your object and how to apply some Photoshop magic to create the perfect floating object scene, with the perfect lighting and, of course, your favorite mug.