"M" means metric threads which are defined by their diameter in millimeter and thread pitch (the distance between adjacent threads) in the same units. An M8x1.0 bolt is 8 mm in diameter with a thread pitch of 1 mm.
Most square taper bottom brackets use M8x1.0 mm crank fixing bolts. ISIS and Octalink bottom brackets have larger diameter hollow spindles and most use M15 crank fixing bolts. The two types are not interchangable.