A quirk is an odd occurrence or a unique and peculiar behavior or characteristic. (noun)
When a strange twist of fate leads you to bump into your old high school sweetheart and you end up getting married, this is an example of a quirk of fate.
When you have to do something sort of odd, like spin around twice before sitting in your chair, this is an example of a behavioral quirk.