Robots have all kinds of legs, and wheels and more! And they are used for all kinds of different things. And if you don’t use the right kind of locomotion on the right terrain your robot wont work as well.
Wheels can be used for many things like going over big hills and going on rough terrain. And they are the easiest to control and program. But when they fall over they can not get up unless you help it. You can have many wheels also! they can go really fast and not fall on a smooth surface
Tracks are good for rough terrain and are very stable. They are not good for turning and are not very agile. but when used on rocks the tracks work well.
Legs can make a robot jump, walk and run. And they can go up stairs and go on rough terrain! But that makes it very hard to make and program. Some robots that have legs can even have wheels on their feet!