Michael Cox gave good answers.
To keep from swarming, you need to do two things:
1. Make sure the queen has
enough space to lay. This may mean removing honey frames from the brood box and replacing with drawn comb or even foundation
2. Make sure there is enough space for the bees. If you have a single box, and 5 frames of capped brood, you need to add a second box NOW. 1 frame of brood = 3 frames of bees.
3. In the spring, look for queen cells. If you find them, and especially if they are capped, you need to make a split NOW! Don't wait a day, or it may be too late
Pull the queen and 3 frames of bees and put them in a nuc box, (or whatever box you have) and move them to the opposite side of your
yard. You might want to give them a quart of sugar
water to help them get started, but during the flow, this won't be needed. Give them 2 frames of empby foundation, and they will draw comb like you've never seen.
Leave the 2 biggest queen cells in the original hive and they should have a new, laying queen in the next 3 weeks. Look for eggs and larvae after 3-4 weeks.
Giving the bees space may slow the swarming instinct, but it won't stop it. Best to make your own swarms by splitting. You can always
sell bees! Might pay for some equipment.
This is very simplified, but hopefully it gives you some ideas. Having a "swarm trap" isn't a bad idea either.