a 9 speed cassette and 10 speed cassette are the same width. the amount of space between the cogs is different to fit more in the same amount of space.
11 speed cassettes are wider (shimano/sram). a 10 speed cassette on a 11 speed freehub body requires spacer, but an 8, 9 or 10 speed cassette all fit on the same freehub.