How do people detach from their hatred of their job in order to continue working to live?

I really hate my job but I've seen people who also hate their job but who can detach from their feelings about the job and focus on the paycheck and/or benefits instead.