The hardware needed will likely be dictated to some degree by the manner in which the shelves are supported and how much weight the shelves are being asked to support. A true floating shelf will often use a french cleat as Keshlam suggested, often in this situation an aluminum version called called a Z-clip.
This shows the short, clip style but it's available in 8' lengths too that you would cut to the length you need.
These are easy to install and can hold some pretty extreme weights (the exact load maximums will be listed on the package or the website tech sheet) but the shelf has to be thick enough to encapsulate the thickness of the brackets plus the distance required to engage the two halves, plus some room for a lip top and bottom. Like so:
The good news is these are available in many sizes and can be found in most home centers or online for a reasonable price. The (possibly) bad news is you'll almost certainly have to make or at least modify a shelf to suit your needs. As far as hardware is concerned in general: use a good quality wood screw that gets at least 2" of bite into the shelf and on every stud that you can catch (you may have to enlarge the countersink to accept a larger screw head or drill some new holes to suit the spacing of your walls substructure) into both the shelf and the stud side. Unless your trying to support an unreasonable amount of weight you should be okay.
Of course you can always just pick up a store bought floating shelf. Most come with a lightweight keyhole style hanger (seen here)
but will still hold a fair amount (not much though). As for screws, they're often included with the kit but the same rules apply as previously discussed so if you buy a shelf package from Ikea or wherever and it comes with inch long screws or those plastic drywall anchors, do yourself a favor and go buy some real screws to mount it.