Question: What is the main difference between a screw and a bolt?

Bolt (fastener)




A bolt is a form of threaded fastener with an external male thread. Bolts are closely related to screws.[1]
Bolts vs. screws



The distinction between a bolt and a screw is commonly misunderstood. There are several practical differences, but most have some degree of overlap between bolts and screws.
The defining distinction, per Machinery's Handbook,[2] 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. For this reason, many bolts have a plain unthreaded shank (called the grip length) as this makes for a better, stronger dowel. The presence of the unthreaded shank has often been given as characteristic of bolts vs. screws,[3] but this is incidental to its use, rather than defining. 
The unthreaded grip length should be chosen carefully, to be around the same length as the thickness of the material and washers through which the bolt passes. An overly long unthreaded length prevents the nut from being tightened down correctly. An insufficient unthreaded length results in the threads extending into the hole, and places the dowel shear load onto the threads, which may cause fretting wear on the hole. No more than two turns of the thread should be within the hole.[4]
Where a fastener forms its own thread in the component being fastened, it is called a screw.[2] This is most obviously so when the thread is tapered (i.e. traditional wood screws), precluding the use of a nut,[2] or when a sheet metal screw or other thread-forming screw is used.
A screw must always be turned to assemble the joint. Many bolts are held fixed in place during assembly, either by a tool or by a design of non-rotating bolt, such as a carriage bolt, and only the corresponding nut is turned.[2]
Bolt heads

Bolts use a wide variety of head designs, as do screws. These are designed to engage with the tool used to tighten them. Some bolt heads instead lock the bolt in place, so that it does not move and a tool is only needed for the nut end.
Common bolt heads include hex, slotted hex washer, and socket cap.
The first bolts had square heads, formed by forging. These are still found, although much more common today is the hexagonal head. These are held and turned by a spanner or wrench, of which there are many forms. Most are held from the side, some from in-line with the bolt. Other bolts have T-heads and slotted heads. [5]
Many screws use a screwdriver head fitting, rather than an external wrench. Screwdrivers are applied in-line with the fastener, rather than from the side. These are smaller than most wrench heads and cannot usually apply the same amount of torque. It is sometimes assumed that screwdriver heads imply a screw and wrenches imply a bolt, although this is incorrect. Coach screws are large square-headed screws with a tapered wood screw thread, used for attaching ironwork to timber.
Head designs that overlap both are the Allen or Torx heads; hexagonal or splined sockets. These modern designs span a large range of sizes and can carry a considerable torque.
Bolt types
Anchor bolt - Bolt designed to allow objects to be attached to concrete. The bolt head is usually placed in concrete before it has cured, leaving the threaded end exposed.
Arbor bolt - Bolt with a washer permanently attached and reversed threading. Designed for use in miter saw and other tools to auto tighten during use to prevent blade fall out.
Carriage bolt - Bolt with a smooth rounded head and a square section to prevent turning followed with a threaded section for a nut.
Elevator bolt - Bolt with a large flat head used in conveyor system setups.
Hanger bolt - Bolt that has no head, machine threaded body followed by a wood threaded screw tip. Allow nuts to be attached to what is really a screw.
Hex bolt - Bolt with a hexagonal head and threaded body. Section immediately under head may or may not be threaded.
J bolt - Bolt shaped like the letter J. Used for tie downs. Only the non curved section is threaded for a nut to be attached.
Lag bolt - Also known as lag screw. Not a true bolt. Hex bolt head with thread screw tip for use in wood.
Rock bolt - Used in tunnel construction to stabilize walls.
Sex bolt or Chicago Bolt - Bolt that has a male and female part with interior threads and bolt heads on either end. Commonly used in paper binding.
Shoulder bolt or Stripper bolt - Bolt with a broad smooth shoulder and small threaded end used to create a pivot or attachment point.
U-Bolt - Bolt shaped like the letter U where the two straight sections are threaded. A straight metal plate with two bolt holes is used with nuts to hold pipes or other round objects to the U-bolt.
Selection of bolt material
Regarding the requirement of the strength and circumstance, there are several types of material can be used for the Fastener Material Selection.[6]
Steel Fasteners(Grade 2,5,8) - the level of strength
Stainless Steel Fasteners (Martensitic Stainless Steel, Austenitic Stainless Steel),
Bronze and Brass Fasteners - Water proof usage
Nylon Fasteners - it is used for the light material and water proof usage.
In general Steel is the most commonly used material of all fasteners(90%) above.
See also

ASTM A325, standard for bolts 1⁄2 to 1- 1⁄2 in diameter
ASTM F568M, standard for metric bolts M12-M36
Mechanical classifications
Screw thread
Socket wrench
Thread-locking compound
Torque wrench
Washer
Wrench