1 centimeter is 1/100 of a meter, while 1 millimeter is 1/1000 of a meter. There are 10/1000 in 1/100, which means that you can fit 10 millimeters in 1 centimeter.
1 *square* centimeter is the area of a square with sides of 1 cm long, giving it an area of (predictably) 1 x 1 = 1 sq. cm. Since each side of that 1 cm x 1 cm square is 10 mm (millimeters), we can fit 10 x 10 = 100 sq. mm in that same square.
We can use that same logic to figure out the second problem. There are 100 cm in 1 m, so to find the number of *square* centimeters in a 1 m x 1 m square, we multiply 100 cm x 100 cm to find that we can fit 10,000 sq. cm in 1 sq. m.