to cut into a hard surface, and so to lay down as fixed: to engrave or inscribe, and by extension to decree, prescribe, or enact
At its root this word means to cut something into a hard surface: to carve a tomb into rock, scratch a figure onto a brick, or engrave a name into metal. It stands close to the ordinary word for writing, כָּתַב, but adds the idea of cutting in rather than merely marking, so that what is set down is meant to last.
From that physical act the word reaches into the world of law. A binding ruling was cut into stone, so engraving a decree and issuing one became the same act. The word therefore also means to decree, prescribe, or enact, and the related noun חֹק names the fixed statute that results.
Its most striking use is as a title for a person. The one who lays down such rulings is called by this word, which can point to a commander or ruler, or even to the staff of office he carries. When Isaiah calls the LORD "our lawgiver," this is the word he uses, casting God as the ultimate authority whose rulings stand fixed.