And don't wait until it's too late to learn this!
I had a minor form of cancer a few years back, and I went to HR to let them know about it, thinking what I told them would be kept in confidence. I had been with the company for 11 months, and they didn't offer medical leave until 12 months, so I figured with my positive reviews to-date it'd be easy to just get that bumped up a bit.
The next day my manager knew, so everyone knew, and the HR folks that had been seemed so kind and understanding were cold and aloof. Instead of granting my request, they sent me a nice form letter reminding me to read the employee handbook around who would qualify for medical leave and suggested I postpone my treatment until I had been with the company for 12 months.
Of course, this had a lot more to do with me being a key player in helping them land a big project. I'd been the pitchman that the prospective clients liked, and had the most rapport with. To help ensure the company landed a stupid project they were willing to tell me to hold off cancer treatment. Ethical? I mean... it was legal, so they did it. (I resigned and got treatment immediately, also told the prospective client why I resigned. The company didn't get the bid.)
And, if you are ever laid off or fired, HR are the ones who will come down on you about talking to your old friends at the company and do everything they can to save the company every last penny (by screwing you out of it).
Another situation... I had a personal friend at a company, knew him before I got the job. Then I then got laid off with about half the team when the company didn't make numbers one-quarter. The severance package was very specific about us not talking to current employees or clients, but I figured since I knew the guy and he was a friend it wasn't going to be a big deal.
Someone in HR instructed IT to set up a filter to catch all the emails coming in, and when my buddy asked me a question and I responded (it was something silly like the combo to the paid gym in the building -- he wanted to use my membership since I wasn't going to need it), they ran it up the flagpole and immediately cut my health benefits (without warning) and demanded I repay my severance payment. It took a lawyer to get them to back down about repayments, and I never did get my health benefits back.
HR is not to be trusted. Get everything they say in writing. Don't tell them anything you aren't comfortable sending out in an all-hands email.