The most common type of floating shelves are made of tempered glass. The glass is cut to size and then heat-treated to make it stronger. A metal bracket is attached to the wall, and the shelf is then hung from the bracket using special clips.
Some floating shelves are made from wood, and these are usually thicker and more sturdy than the glass shelves. They're still easy to install, though, since you can just screw the brackets into the wall.