A word used in response to whenever something happens that is somewhere on the spectrum between a mild inconvenience or a great tragedy, and there are no better words to express condolence. Can be used interchangeably with "rip"
Person 1: My boss is chasing me for those files
Person 2: oof
Person 1: I had a car crash earlier today and someone broke their neck.
Person 2: oof
Person 1: I just accidentally released a zombie virus into the world and started the apocalypse.
Person 2: oof