I (think I) understand that there were nobles with estates and fealty-swearing knights that became part of an army in times of war, but what was the structure of law enforcement within the country? Was there an equivalent to the modern police force, or was it something entirely different?
Medieval England obviously had a much different system of law enforcement and keeping the peace than we do today. It is at times hard to separate the military systems of Medieval England from those that preserved order and maintained laws. For instance, in Anglo-Saxon England the fyrd, or militia, had three traditional duties. These were military service, bridge repair and fortress work. When Alfred the Great reorganized the Fyrd to be more effective at defending against Viking attacks, he leaned on these traditions to require all fyrd members to help guard their local Burh or fortified town. In this capacity, urban areas would be guarded by men drawn from the local shire, and they would most likely have helped maintain order and prevent theft/other petty crimes in the town. Some of this is speculation but militias and town guards have traditionally peformed some of these services.
In the rural areas, and indeed in every shire and hundred (groupings of land), there were men known as Reeves. Reeves would be tasked by either the King or a local magistrate (Ealdorman or Earls) with maintaining order, collecting taxes and also performing military service. In fact, the Shire Reeves of Anglo-Saxon England are where we get the word Sheriff - an important term in modern law enforcement.
While the Reeve/Sheriff system survived the Norman Conquest (1066), the fyrd system died out rather quickly under the Norman Kings. While there are some cases of it being used to organize some expeditions, it fell into disuse and was replaced by the feudal levy. In some ways these resembled eachother, except the principle unit being raised in a levy was a mounted horseman (knight) as opposed to large bodies of infantry. This also meant that the traditional duties (bridge upkeep, Fortress work and military service) were less and less delegated to the common peasant, who was rarely called up for war for several centuries. Instead tax revenue was raised and then paid to large mercenary bands to provide a hardened fighting force alongside knights - this was the policy of English Kings from Stephen to John. Anyway that was a longwinded analyses of why the fyrd system, and its partial contribution to law enforcement, faded away.
So while the countryside was still somewhat policed by the various Sheriffs (they often became more involved with rent collection than law enforcement), some of the weight now fell on the Nobles and Knights that you mentioned in your question. It was pretty haphazard, and outlaws/bandits were definitely present if not common. Knights and nobles had a theoretical duty to protect their lands and the people living on them from enemies, so many crimes would be punished by these soldiers. There was definitely little investigation of crimes, and so that element of law enforcement was not present at this time. On the other hand, the English Court system, an incredibly important element of modern law enforcement, was actually quite advanced at this time. Using Hundred courts (basically local rural community courts), Shire courts (often the domain of an Earl) and then Royal courts, judges held what are called judicial eyre - basically circuit courts where they would visit areas and resolve disputes and adjudicate different cases. If you were a rural Englishman, this would be where you would bring a case before a judge, and this added an element of stability and justice to Feudal England that was perhaps lacking in other areas. The Courts were controlled and protected by local magnates or by the King himself, and so individuals convicted of crimes in these courts were often held accountable - unless they were noble/rich, in which case they could either buy their way out or have others pay the bail for them. This is probably an overly simplistic way of looking at the situation but hopefully it gives you a better idea.
As England progressed into the High and Late middle ages, the system continued to go through some changes. Edward I passed some regulations stipulating the armament and readiness of local militias, for example. Some of this may have been just re-applying the standards of his father Henry III, but it also helped reorganize rural levies. Edward I needed large bodies of troops for his numerous wars and organizing the agricultural population militarily served to increase the number of equipped and (somewhat) trained troops he could bring into battle. It had the added consequence of requiring locals to again account for their own protection. After the passing of the Statute of Winchester, militias again were tasked with raising the "hue and cry" if there were intruders/law breakers in the area. This required them to call out when they had seen a crime committed, and then required them to chase the criminal until caught. These men would have been under the authority of the local magnate or the sheriff, and so we can see in this system the remnants/revival of some of the fyrd system of maintaining order.
Anyway I hope this answers some of your question. For some reading on the subject I would recommend Frank Barlow's The Feudal Kingdom of England, 1042-1216 and Michael Prestwich's Plantagenet England, 1225-1360 There may be more in-depth sources, and some of my information was drawn from Henry III's Assize of Arms which is a primary document which isn't too hard to find, or Edward I's various statutes. There are numerous books you could find on Anglo-Saxon England, and most will give you a general view of the situation. Barlow in particular gives a good view of the shift from Anglo-Saxon institutions to those of the Normans.
Hope that was helpful!
hi! not discouraging other responses, but fyi, there have been a few posts on the history of policing; I rounded up a bunch here, which will include several comments on England