bolt and nut
A nut is a small metal object with a hole in the middle that has corrugated hole. These curved holes are known as threads. Nuts are used as a fastening device. It is important to note that evens though nuts are used as a fastening device, they cannot be used without bolts. To understand this, we have to understand the shape of walnuts. The outer part of its body can be shaped either way, but it is mostly hexagonal cap or circular in shape.
The inside shape is always circular; this is because this is where the bolt stem fits, and the bolt stem is always cylindrical in shape so that it can rotate easily and fit into the threads. The two partners (i.e., nuts and bolts) are held together by a combination of friction of their thread, a slight stretch of the bolt, & compression of the part to join together. The nuts come with a separate locking mechanism that prevents machine parts from loosening due to the vibration of the parts or parts that they joined. They are mostly of a circular cross-section.