The hubs can be 135 ("mountain") or 130 ("road") mm. What is your bike make, model and year? You also can try measuring the frame width where the hub is with the rear wheel in it. Then let us know what it is.
If your cassette is Shimano compatible, freehubs for 8/9/10 speed are compatible. You can use a 7 speed cassette on an 8/9/10 speed freehub with a spacer.