This article covers a topic that has not been fully explored on the show and thus contains some information taken from the books, in addition to information from the TV series.
Wards are barriers created with magic.
Wards serve as a shield meant to keep something in or out of a certain area. They exist in different levels of power, and may be put up through spells, runes, or may even be naturally existing.
Shadowhunters have wards at their disposal, given to them by the Angel Raziel, the first being the wards he placed around Idris, preventing the country's discovery by mundanes, who are incapable of passing through wards, while allowing Downworlders and Shadowhunters to do so without difficulty.