How can a serf escape?

First, it is important to understand that serfs are not slaves or prisoners. Serfs were not free in the modern sense either, however. A serf owed labor to the lord of the manor, which was typically two days per week. They also could not move away from the manor without the lord's permission. They would have owed rents and other fees for the land that they held in the village fields.

Apart from this, however, a serf's time was his own. They owned their own homes and personal possession. They could use the time not owed to the lord to work their own lands, if they had them, or to hire their labor out for pay. They could sell any goods they grew or made in the nearby town market, controlled their own money, and could both bring suit and be sued in the local manor court. A serf was not property, they could not be sold or given way by their lord, and had many traditional legal rights.

Not all serfs were poor. A serf's income was tied to how much land they controlled. Those without land were poor, and had to survive by the produce of their gardens and hiring out as labor. Those that held 10-15 acres could likely provide for their family needs by subsistence farming and selling any thin surplus. A few serfs gained control of more land, either through opportune marriage or shrewd business dealings, and lived quite comfortably. They might hire other villagers to help them work their land, or to work their labor obligation to the lord in their place. Some even had enough property to take on their own tenants.

Also, some peasants were free, and did not owe labor to their lord. Freedom did not necessarily mean economic superiority, however. Free peasants ranged from poor cotters to comfortable landlords, just like their unfree serf neighbors.

So, serfs did not necessarily want to "escape". Those with land, even if unfree, had a reasonably dependable living from that land, and would probably be distressed at the prospect of leaving it. A poor serf, or the younger son of a serf who did not stand to inherent any land, might be interested in leaving the manor. This was sometimes done legally. An agreement might be reached with the lord of the manor to free a serf for a fee, and if the person was young their family might arrange an apprenticeship with a craftsman in a nearby town.

In other cases a destitute serf might simply run away to a town or city. There was a legal tradition that if they were able to remain in a town for a year and a day they were then free and a resident of the town. Without a trade to go to, or some other arrangement for living, this was not necessarily a less precarious life than that of a poor serf. At best they would end up doing manual labor or working in an unskilled or semi-skilled job for a shop, with little potential for improvement of their situation.