To me, it's been a mystery. Very few of my employers made salary subject to negotiation. "We offer X," nothing more than that.
Normally, in a job where there is a "salary range" advertised, that either means the job itself pays from X to Y over the range of possible pay grades (government jobs may start you at somewhere from X to Y depending on your qualifications, but it's not negotiable what step you land on), or it's a range of what an employer is willing to pay.
When the latter is the case, once you are offered a job, the topic of salary will come up. They will offer you the job. If you say nothing about salary, you'll get what they want to give you if the matter never comes up. If you ask, or they tell you the amount they are offering to pay, you can accept or decline the position...generally the issue here is to say, "Well, that's nice, but I really can't come to work for you for that amount" and then counter their offer with an amount you would like to get. This might go back and forth, and it can be a tricky matter in that if there is more than one person they could choose to hire and they don't want to budge on the pay, they could just move on to the next candidate...so much depends on how much they want you and your skills.