The main difference between walking and running is obviously first speed, but also overall effort exerted. From an effort and cardiovascular perspective, running is a lot more difficult than walking because it requires the body to output more energy to pump the arms and pick up the legs at an increased running pace. Depending on how fast and how hard you work, running (or sprinting, rather) may also become an anaerobic activity. This means that the body is working extremely hard for shorter periods of time, with quick bursts of power, without oxygen (as opposed to light jogging or walking in which the body is not working hard enough to be in an anaerobic state, and thus has access to adequate fuel and oxygen). This anaerobic state, in which muscle cells must rely on other reactions besides oxygen and fuel intake to work, is why running is more difficult than walking.
This also gives some insight into why people say running is better than walking. Basically, what they are saying is that running is a more efficient calorie burner and cardiovascular workout than walking. In a shorter amount of time, you will burn far more calories than you would in the equivalent time spent walking. Plus, the anaerobic state actually helps greatly increase fat loss because the anaerobic metabolism increases (known as the metabolic threshold), which sends the body into an increased recovery mode (aka a heightened calorie burn) for hours even after the workout is complete. Plus, while all forms of cardio help increase endorphins (including walking!), running is a more efficient endorphin release and boost for serotonin levels. This means that running has a fast and positive impact on mental health, helping relieve anxiety, depression, and stress.
The article "Should You Walk or Run Fast?" by Vox (linked below) has several links to studies that dive into the benefits and risks of walking versus running. Overall, running definitely comes out on top - though it is important to note that a high impact activity like running also poses a greater risk of injury. But as long as you wear the right attire, train properly and safely, and hydrate and fuel yourself properly, you can easily avoid an injury!