Razor wire serves as both a physical and psychological deterrent to prevent unauthorized entry or escape. It is commonly installed at the top of fences, walls, or in large coiled formations (known as concertina wire) to create a barrier that is difficult to climb over or cut through without specialized tools.