I assume you are talking about the "string" that is commonly referred to as an eruv. At the expense of over-simplifying:
Generally, a reshus hayachid is an area which is mostly enclosed and contains no breaches. A breach is an opening larger than 10 cubits wide. However, an opening that is more than 10 cubits is not considered a breach if it is formed as an entrance way- which includes 2 "posts" and a crossbar.
The sages forbade carrying in an open area (breached), even when not classified as the biblically restricted public domain, because of it's similarity to public domains (no walls). An allowance was made for areas which indicated a similarity to a private domain through making it figuratively unbreached. This is done through a series of entrance ways around the area using "poles" (lechi) and "crossbars". Since there is no minimum thickness for these, a thin, but sturdy, wire is used.
Unless the area is private property, a separate issue still exists. The sages forbade carrying in an area with multiple families residences since it resembles a public domain even if there are walls (it is public). An allowance was made where there was an indication that this domain is not public- called Eruv. This is done by one head of a household acquiring bread (meal food) for everyone in the area. Based on the idea that a person's home is where his food is, everyone now "lives" in a single residence where the bread is. (Practically, this is done by the Rav, remains in the shul, and is done with matzos so they don't have to be replaced as bread stales quickly.)
There are stricter and more lenient opinions.