Meaning: to be silly, wild or crazy or to be someone who plays jokes on people
Example: He was a bit of a mad cap always playing jokes on others and walking on the edge of the road to see how close he could get to the cars going by.
See this Idiom in a story: The Three Little Pigs