Nunchaku are two, three or more sections of wood connected by a cord or chain. Okinawan nunchaku were originally developed from a wooden horse's bridle and were used to defend against knife attacks. Because of the scarcity of metal on Okinawa when you went into town on your horse you would remove the bridle because the bit was metal. If you left it on the horse someone would steal it to get the metal. You would then keep it in the sleeve of your kimono and if you were attacked you then had easy access to it so you defend yourself.
Chinese nunchaku are usually rounded and were developed from fails used to thresh rice. Okinawan nunchaku now tend to be hexagonal and are more like the Chinese version.