Refers to an unexpected, lucky outcome that was not due to skill or effort. Often used in phrases like まぐれ当たり (a lucky hit) or まぐれ勝ち (a fluke win).
I think that goal was a fluke.
試験に受かったのはまぐれだ。
Passing the exam was pure luck.
This win was just a fluke.
I passed the exam by sheer luck.