It means:
* To be completely out of ideas or solutions.
* To be in a state of extreme frustration or despair.
* To be at the limit of your mental resources.
Example:
* "After hours of trying to fix the computer, I was at my wit's end."
* "The constant noise from the neighbors is driving me to my wit's end."
It's often used to describe a situation where someone has exhausted all their options and is feeling hopeless.