I have seen tutorials where the bump node is connected to a glossy shader and sometimes a diffuse shader. How do I know which one to connect it to? Basically how does it work? And it also has a normal input, what is that for?
The bump node creates normal vectors from grayscale textures. You connect it to the shader(s) that you want that normal map to affect. Normally you connect it to every shader, but it depends on the material you want to create. Sometimes each shader requires a different normal map than another shader, so it's up to the artist to decide. It works by finding the derivatives from every pixel in the texture, to form a transformed vector that is applied to the default normal vector, or a custom vector linked to the normal input.