What kind of salt is used to keep roads from getting icy and how does it work? Why does ice get thick in some places and other nearby places there is no ice?
Sodium chloride rock salt, NaCl, is usually used for de-icing roads. As mentioned in another answer, the dissolved ions lower the freezing point of water.
Other kinds of salt are also used. Calcium chloride, CaCl2, is more efficient at melting ice. NaCl can not melt ice at temperatures lower than -18C (0 F). A saturated calcium chloride solution won't freeze until ~ -46 C. Calcium chloride is often applied as a solution because the solid becomes sticky as it absorbs water from the air.
The kind of salt used to keep roads ice-free is rock salt. Rock salt is an evaporite, which was once a salt lake like the one near Salt Lake City in Utah called Bonneville Salt Flats. In the course of millions of years, many salt evaporite deposits have become buried deep underground. A mine typically produces thousands of tons per year.
The reason it works is that salt water has a lower freezing point than fresh water, so fresh water precipitation such as rain or snow will easily freeze in the sort of night-time winter temperatures they have in UK, for example. As salt water freezes at lower temperatures than are usually encountered in UK, roads which have been salted usually remain clear. Icy roads are dangerous, and cause traffic accidents, so when freezing conditions are forecast the municipal authorities have vehicles which drive around spraying the road and sometimes sidewalks with rock salt. Most rock salt has natural grit mixed with it, which also helps prevent vehicles skidding.
The reason you might get clear roads in some places while there is ice nearby is that the spraying of the roads is not always even, and some small areas are missed. Another reason is that having been salted, the even spread of salt is spoiled by rain showers, which remove it from some places and concentrate it in others.