Samson was born from Manoah and his barren wife as the child who would free the Israelites from the Philistines. As a condition, the mother couldn't eat impure things or drink alcohol, and the child couldn't cut his hair under any concept.
Samson can be considered the Biblic version of Heracles, given his miraculous strength. This inhuman power was the blessing of Yahweh over him, and helped him perform many great feats, in which we can count: ripping a lion apart with his bare hands, killing 1,000 Philisteans with a donkey's jawbone, tearing off the gates of Gaza, turning a millstone on his own, and forcing the collapse of a temple. This last feat is the responsible of his death.
After having fleed from Gaza, Samson met Delilah and fell in love with her. Delilah was a Philistine woman that was bribed with silver coins to make Samson reveal the secret of his strength. After several failed attempts, Samson finally revealed that he'd become powerless if his hair was cut. During his sleep, Delilah ordered a servant to cut his hair. The now weak Samson was caught prisoner by the Philistines, had his eyes gouged out, and was forced to grind corn by turning a millstone.
Later, the Philistines would offer a sacrifice to their god, Dagon, and have a party at the temple. Samson was taken there to entertain them. Once in the temple, he asked to rest between two columns. Pleading Yahweh to remember him, he recovered his usual strength, and by pushing the columns, he made the temple collapse, killing 3,000 Philistines along with himself.