When read as hāi, 咳 is a sigh of regret or frustration — equivalent to 'alas' or 'oh well.' When read as ké, it means 'to cough' (咳嗽 késou). Context makes the difference.
usage
Similar sighing interjections: 唉 (āi/ài) and 哎 (āi). 咳 tends to convey a heavier sense of resignation.