You need to loosen the chain adjuster enough to loosen the chain. Then pull the axle out and slide the wheel forward. Then slide the chain off the sprocket.
It depends on what kind of sprocket it has-Is it a multiple speed bike or is it a single speed? Either way, you need a cassette/sprocket removal tool to extract the sprocket. These are found at your local bike shop.