If a spoke breaks, the rim of your wheel is likely to go out of true. If you have rim brakes, the rim will probably rub on the brake pads. Even if you have disk brakes, your tire may now rub on the frame. You’ll need to adjust the tension in some of the other spokes to make up for the broken one.
First, deal with the broken spoke. It might just be easiest to bend it around the spokes next to it to hold it out of the way. Or, if you have a spoke wrench, take the broken spoke, bend it into an L shape, and hold on to this L as you loosen the spoke nipple to remove the outside part of the spoke. Push the other end of the spoke out through the hole in the hub. On the drive side of the rear wheel this may not be possible because the rear cassette might be in the way. If you can’t remove part of the spoke, wrap it securely around the next spoke.
Now, adjust the spokes on either side of the gap to make up for the loss – loosen spokes that go to the opposite side of the hub, tighten spokes that go to the same side. Turn the ones closest to the gap by about one half turn, the next ones by one quarter turn and the next again by one eighth turn. If this isn’t sufficient, apply similar proportions to the same spokes again.
Remember that the spokes might twist along with the spoke wrench and nipple. Normally, you can account for this by turning the nipple past the desired point and then back. On wheels with unusual spokes (bladed, straight, etc.) you may have to hold the spoke with pliers or a crescent wrench to stop it from turning while you turn the nipple.
Rim brakes will almost definitely need adjustment away from the rim, as it will still have a pronounced kink in it. The main goal is to get the wheel to spin without the tire rubbing on the frame. It may be necessary to cut the tread down on particularly wide or knobby tires.