The gauge in the pattern may not be the same as the gauge on the yarn label; some patterns use looser or denser gauges for design effect. So you would get a yarn that has a gauge close to the yarn used in the original pattern. So if the original is a worsted, another worsted would be a good fit, but you won't match the gauge if you use a sport weight or a bulky. If you let us know the yarn used in the pattern we can help you identify what you can sub for it.
sue- knitting heretic