My guide here explains Layer Masks (second page): [link]
You would use the Transparent Pixels Lock when you have a layer that contains transparent and opaque parts and you only want to change the opaque parts. For example, if you wanted to color different parts of your lineart different colors and only the lineart is opaque on that layer, you would turn on the lock and then use the Brush tool to color over the lines you want to change without affecting anything else.
Yes, only the lineart will change color (it doesn't have to be black). Anything that is transparent won't be affected. Just keep in mind that if there's something not completely transparent (say there's a spot you missed that's semi-transparent), it will also change color, so the lines must be the only thing opaque on the layer and everything else transparent to get the best results.