It was a gathering up of the hair, after a fashion similar to the modern chignon, and sometimes called a "cock-up".
For example, "The Ministry of Defence's programme to make airworthy the eight Chinook Mk3 helicopters, which it acquired in 2001 for special operations work, has been a gold standard cock-up.
"[1] The contemporary British English usage of "cock-up" likely derives from the nautical usage of the term to describe an arrangement of the yards of a square-rigged vessel in port, and therefore likely predates the cockernonnie derivation suggested above, square-rigged vessels being in use considerably before most of the Scots references quoted here.
Modern folk etymology has sometimes suggested that "cock-up" refers to a male erection, or to the phrase "cacked up", but this is untrue.
John Jamieson was of the opinion that "cockernonnie" signified a snood, or gathering of the hair in a band or fillet.