A nut is a type of hardware: a small, often hexagonal piece of metal, with a hole with internal screw thread, to be fitted onto a bolt which is inserted through holes of two or more objects, to attach these objects to each other.
A nut is a derogative slang term for a crazy person, with the plural "nuts" used to refer to a state of insanity.
A nut is a small strip of hard material used to stop string vibrations on some stringed instruments. It is located at the upper end of a fingerboard and, along with the bridge, defines the vibrating lengths of the strings.