The distinction between a bolt, flange bolt and screw is commonly misunderstood. There are several practical differences, but most have some degree of overlap between bolts and screws.
The defining distinction as per Machinery’s Handbook is in their intended purpose. Bolts are for the assembly of two unthreaded components, with the aid of a nut. Screws in contrast are used in components which contain their own thread, and the screw may even cut its own internal thread into them Many threaded fasteners can be described as either screws or bolts, depending on how they are used.
Bolts are often used to make a bolted joint. This is a combination of the nut applying an axial clamping force and also the shank of the bolt acting as a dowel, pinning the joint against sideways shear forces.