I don't trust the clamp that comes with it at all. I hang it on a wire so it cannot fall or get knocked down and make sure I have a second wire as a back-up.
How far away depends on where it is, your temperatures, and how the brooder is made. It will be different for all of us. I put a thermometer in the brooder before I add chicks and adjust the height until I get temperatures around 90 to 95*F right under the lamp. The far corners of the brooder get a lot cooler so they can find their own comfort zone. Once I get the temperature right under the lamp where I want it, I take the thermometer out and let the chicks tell me if it is too hot or too cold.
The day I put them in, it was about 90 to 95*F under the lamp but 70*F at the far corner of the brooder. The first couple of days, they pretty much stayed under the lamp, but in a very few days, they were wandering all over the brooder, coming back to the lamp if they got cold.