The number is the viscosity, so higher is thicker.
There are 2 numbers becasue it's multigrade, when a 10w/40 is cold, it's as thick as an SAE10 oil (10 weight oil). when it's hot (100 degrees c or more) then it behaves like a 40 weight oil.
THAT DOES NOT MEAN IT GETS THICKER
it just doesn't get as thin as a monograde oil.
So the lower number, often the W (winter) number is it's viscosity at startup, yo uneed a thin oil so that it'll move round fast and protect the engine as soon as it fires up.
With that in mind it's better to use a 10w/40 at this time of year and a 15/w40 in the summer.