“A paradox is an argument that produces an inconsistency, typically within logic or common sense.”-Wikipedia.
Computer scientists study paradoxes to learn about logical inconsistencies because computers (being as stupid as they are!) can not handle them. This is particularly important in the fields of Operating Systems, Artificial Intelligence, Machine Learning, etc. On top of that, paradoxes are extremely fun thought exercises! The unexpected hanging paradox is described as follows:
A judge tells a prisoner that he will be hanged at noon on one weekday in the following week, but the execution will be a surprise to the prisoner.