What determines whether or not I have hidden a body?

A body is hidden as long as no one sees the body. This includes cameras and robots.

There's really no such thing as "hidden" there's just "hasn't been found yet".

If you're talking about the very first mission (the prologue) then alarms automatically go off no matter what at certain points. They won't prevent you from getting the Foxiest of the Hounds achievement though, which requires the Smooth Operator bonus whenever you can possibly get it.

Also, there are a couple of other times in the game that alarms will be unpreventable, and again they won't prevent the achievement.