Blood clots in the lungs do not actually form inside the lungs. They come from somewhere else inside the body.
Look at this picture to understand where blood clots form and how they end up in your lungs. As you can see, veins collect blood from different parts of your body, returning it to the right side of your heart. The right side of your heart pumps blood into your lungs.
Blood from the right side of your heart goes into two pulmonary arteries and into both lungs. Inside the lungs, these arteries divide into smaller branches that supply blood to the whole lung.
Blood clots form inside those large veins. Most blood clots in the lungs come from deep veins in the legs. Less commonly, they may also come from deep veins in the arms.
Clots from these veins travel to the right side of the heart, and then go inside the pulmonary arteries. They get trapped in the branches of the pulmonary arteries as they divide and get narrower.
As you can see in this picture, a larger clot is more likely to get trapped in a larger branch, while smaller clots travel further until the branch is too small to pass through.