I have a knot in the muscle between the base of my neck and my left shoulder. My Mom calls this katakori, the Japanese term for a muscle knot in your neck and shoulders. I don't know the term or terms for knots when they occur in other parts of the body. The medical term for a muscle knot, in general, is a myofascial trigger point. Unlike the normal state that your muscle is in, a knot is harder to the touch and can hurt. I tried to untangle what is known about muscle knots, but don't take this as medical advice.
Latent trigger points don't hurt, but restrict movement. They can become active trigger points, which do hurt. Trigger points seem to be a problem of the skeletal muscles, rather than the cardiac muscle of your heart or the smooth muscle in your gut.
Muscles are made of many muscle fibres, which are made of many myofibrils, which are made of cylinders of proteins called sarcomeres. But they might as well be a riddle wrapped in mystery inside an enigma, for all that is known about muscle knots. Still, the basic physiology of muscles is that they only contract. The molecules responsible for the contractions are mainly actin and myosin, which pull past each other to shorten the muscle.
Skeletal muscles come in two categories: slow twitch, which work with oxygen more slowly for longer periods of time; and fast twitch, which are further divided into two categories, depending on how long they work without oxygen. I couldn't figure out if knots are more likely to occur in one kind of muscle over another, but muscle groups tend to have a combination of the two.
As muscles get used, waste products like lactic acid and lactates accumulate. The lactic acid makes the environment more acidic, so the muscles do not contract as well. The lactates result in a burning sensation in the muscles, which is a signal to stop. Lactate levels right after exercise, however, are not related to the muscle soreness that people feel in the coming days. But this is separate topic from trigger points.
The causes of trigger points are not clear, but are probably related to the overworking muscles through an acute trauma or chronic microtrauma—maybe from working so hard on this blog post. A muscle fibre with a trigger point is contracted into a small thickened area and the rest of the muscle fibre is stretched thin. Several contracted fibres in one area feels like a knot. These fibres cannot be used because they are already contracted, so these muscles will be weaker.
They may also cause other muscles to contract. Muscles with trigger points get tired more easily and don't return to a relaxed state as quickly when the muscle stops working. This possibly leads to a release of sensitizing chemicals related to pain. Blood flow is restricted, so nutrients and oxygen have harder time getting into the belly of the muscle and waste has a hard time getting out. This may be why trigger points can last a long time unless something is done. People who exercise regularly are less likely to get trigger points. Physical therapies such as stretching, massage and acupuncture seem to be the main ways to deal with trigger points, but these take time to work.