With your:
Constituency votes are counted first. The candidate with the most votes in each constituency wins.
Regional votes are counted next, and regional MSPs are elected using a formula. This means that the number of seats a party gets in total across a region is about the same as the percentage of votes it receives.
This way of electing MSPs is called the additional member system (AMS).
Scotland is divided into 73 constituencies, each one represented by 1 MSP. Scotland is also divided into 8 regions (larger areas covering several constituencies). Each region is represented by 7 MSPs.
This results in 129 MSPs in total: 73 constituency MSPs and 56 regional MSPs.
Previous
Why you have 8 MSPs