Definitely need more information. What type of bike, road, MTB, hybrid? What type of rear hub, freewheel or freehub? What's the frame's rear dropout spacing, 126, 130, 135? What make and model of derailleurs and shifters do you have?
The change can be relatively inexpensive or dreadfully costly depending on what you now have.