There are 33 counties in Scotland and each one is subdivided into parishes. Before civil registration, each parish Kirk was responsible for the people within the parish. The Kirk looked after people's spiritual needs, their morals and guided them on the path to Godly living. The Kirk was tasked with poor relief prior to 1845, and the Kirk was tasked with the burial of the dead. So, knowing which parish to look in for the records is important if you want to find the information you are seeking.
After 1845, the poor were looked after by the local council. The council boundaries roughly follow the parish boundaries, although there have been changes over the years, After 1855, births, marriages and deaths were registered at the local council office.
You need to know not only the parish that your ancestor lived in, but the neighbouring parishes as well. A birth, marriage or death may have been registered in the neighbouring district, depending on when parish boundaries changed.