That involves a decent bit of math and measurement. You have to determine the total weight of the robot, the amount of weight supported by each leg and then calculate the effective torque you'll need from the motor taking into account all the leverage (you say walk so I'm asuming this thing uses legs) For a walking robot you generally need quiet a bit of torque. Once you determine how much torque you need on each leg then you have to figure out how much torque your motor can produce. Torque is measured using a distance unit and a weight unit doesn't really matter what they are, could be gram/centimeters or pound/feet but what it means is that if you attached a rod 1 inch long to central shaft of a motor and measure the force it produces to be 1 ounce then the motor produces 1 ounce/inch of torque.
The easiest way I can think of measuring torque is with a small scale and a platform next to it where you would mount a jig to immobilize the motor, then using a short rod mounted to the motor shaft (the shorter the better) allow the rod to press down on the scale, convert the length of the shaft and the weight measure of your scale to whatever units you want to use and go from there.
Once you know how much weight you have to move you can determine the gearbox ratio you need to get the required torque, a 10/1 gear ration will give you 10 times the torque, but 1/10th the speed. If you need a faster speed for the torque you've calculated them you'll need a bigger motor. Measuring the effective gear ration of the levers (the legs) is a little more complicated because it may not be linear, but basically measure the distance the output shaft of the motor travels for a given end leg travel distance and you'll have an effective gear ratio. Example, if the output shaft moves 1/4 of an inch and the end of the leg moves 2 inches you have a 1 to 8 effective gear ratio for the leg. Legs almost always have high gear ratios, meaning a small motion of the motor will produce a large leg motion so you generally need a low gear ratio for the motor itself to compensate, maybe 10 to 1 for the motor to compensate for the 1 to 8 of the leg, but those are just rough examples.
It's important to watch out for high gear ratios as you can easily produce more torque than the gears can handle at 10 to 1.
As you can see there can be quiet a bit of math involved if you want to really know what you need, but it's not actually that complicated just requires some dedication to measuring and writing everything down.