Fetching details from the dictionary...

to be disconnected; to get out of place; to be off; to be out (e.g. of gear)
to miss the mark; to get it wrong (e.g. guess, expectation); to draw a blank (e.g. lottery)
to be removed; to be excluded
to be contrary to; to go against
ボタンが服から外れてしまった。
The button came off the clothes.
抽選会でくじ引きが外れて本当に残念だ。
I'm disappointed that the lottery missed.
昨日の地震で窓枠のねじが外れた。
The screws on the window frame came off in yesterday's earthquake.