I have received an offer from a university and I want to accept that. In their email they have sent a cc email to another person who is probably the head of HR. In my response, I want to know whether I reply to the sender or reply to all?
In such cases, it is clear that those people are cc-ed to be kept in the loop. So yes, reply to everyone.
(Unless you are very sure they have been cc-ed for some other reason, related to the making of the offer, but not it's acceptance, which is hard to imagine, and would require knowledge of the inner workings of the university.)
Reply-all. The others in the cc are being cc-ed because they are involved in the hiring process and need to know what you decide for their work.
Having said that, the cost of hitting reply instead of reply-all in this scenario is probably basically nothing except someone maybe thinking "I wonder why they didn't hit reply-all" for a few minutes; what will almost certainly happen is that the person who you sent the response to will immediately forward it to everyone else.
My main point is, don't over think it.