Firstly, everyone's mileage does vary when dealing with Human Resources (HR). HR's primary job is to keep the machine running evenly: find new talent when needed, discipline existing talent as needed, remove what-we-thought-was-talent-and-are-now-pretty-sure-aren't-talent-for-us, manage benefits, handle payroll, and a variety of other things that, because I don't work in HR, I can't tell you, but is very important work. For example, some HR departments handle morale budgets. Yes, I find the fact that the people with the power to hire and fire also manage the morale budget.
In any case, as a manager you're going to encounter them in the named capacities above. With luck, you won't be dealing with HR improving your performance or firing you, but those are always available options, so I recommend politeness, documentation and more politeness.
When you are hiring, you need to know where the budget for the humans you are hiring is coming from, and what your budget per hire is. You also need to know what the rates for people doing what you want this person to do outside your company are like. HR typically can provide you with comparative data; you need to find out if they are setting your hiring budget or if your manager (or another group) is, and don't expect it will always by HR that does it.
Because HR is involved in a lot of hirings, they are also a good resource for initial screening questions for hires, and to hit the high points of any specific questions that are required by law or by policy at your place of work; for example, some companies require specific questions regarding diversity and appropriate answers or a candidate cannot be hired at all.
In general, for every company, HR tends to be a smaller machine than the entirety of the rest of the company. HR doesn't generate revenue, and it manages a lot of overhead expenses (interviewing people that may never become members of the company, for example). By the nature of the beast, HR typically has less manpower to throw at problems, so there's a good chance that you'll be following policies to take advantage of what they have to offer that involve taking some time. First of all, taking time is a good idea whenever dealing with HR issues, but second of all, there are only so many of them and tons and tons of you (and departments like you).
Many people vilify HR; they are the messengers of "no" in most companies. They enforce the policies, and, if possible, approve exceptions. They have quotas and goals they have to meet on a quarterly/weekly/yearly basis (just like you) and some of that means not granting the short cut or work around that work better for you, specifically, because someone (usually higher on the food chain than they are) has made a decision about the best way to handle that specific thing and they are required to follow that decision process policy. They, like you, like their jobs and wish to remain employed and not piss off their bosses.
Others vilify HR because of HR failing to meet expectations. Let me explain: I am having a problem with Bob. I talk to my manager, then to HR. HR renders information that results in them not handling the problem with Bob in the way that would work for me. HR, therefore, sucks. Alternately, I'm referred to HR for a behavior I did not expect to upset or annoy others and I'm chastised and warned about it; in extreme cases, I might have to take a class to avoid doing that behavior again. HR does not appear to be listening to my side of things. Therefore, HR sucks. And the list goes on.
HR, like everyone else, has an agenda. They have their work to do and rules to follow. If you miss a milestone, you could be in hot water with your boss or his boss and maybe your job is at risk; if they fail to manage a policy and enforce it properly, in addition to potentially losing their jobs, they could personally be sued and the company could be sued (and the manager involved, and say, you, if you were involved, could also be sued). Basically, if they screw up, it costs a lot more. So they tend to spend a lot of time on the sticky details as a result.
Also, as nice as HR folks are (and helpful, and funny, etc.), their primary job is to protect the company and ensure the machine operates smoothly. That means that telling them things in private has no guarantee of privacy. This means that the outcome that would appear "fair" on a person to person basis is not the outcome applied because they are not evaluating fairness on a person to person basis; they have a broader view of what's best for the company...so they don't get sued. So you don't get sued. So the machine runs efficiently and you all get paid.
What this means to you is that, no matter how good a friend you are to an HR person, you don't casually bring up issues that might be construed as HR problems around them, because they have to act. It's part of their job. It means that when you engage HR to help you hire a candidate, you are agreeing to their hiring policies and must follow them, no matter how esoteric they might seem. It means that if you have an issue with an employee or co-worker, you should have all the steps you've taken to straighten the issue out documented and prove that you've tried to handle it yourself, as your behavior in the conflict with be scrutinized equally with the alleged offender(s).
It means that while individuals in HR can be your friends, HR itself is not your friend. HR is responsible to the law first, the company second, and you third. Never forget the order. HR is a resource available, and one that you should use. But you should use it judiciously and be prepared for all the outcomes, not just the ones that seem most logical to you.