Elwyn Soutter's explanation might benefit from a little clarification; the sheriff-substitute was the judge for the local area (the term is now simply "sheriff", with the former post of "Sheriff" now held by the Sheriff Principal).
In a 'warrant by sheriff substitute' a couple would go to the local Sheriff Court with two witnesses. Prior to 1916 they had to pay a fine for entering into an irregular marriage, but that was abolished by the Marriage (Scotland) Act 1916. The form of registration was specified in the schedule to the 1916 Act, so all of the information entered into the register had to be provided before application to the sheriff (1916 Act, s.1). The sheriff would then issue a "warrant" (certification of the marriage) which the sheriff clerk (the official who recorded all judicial and administrative decisions) would present to the Registrar within three days (1916 Act, s. 1 (3), who would officially record the marriage and issue a certificate.