The short answer to this question is: you shouldn't, unless you are a member of the medical community. You may find yourself in a circumstance where you need to offer first aid to someone with a fracture, however, and it can help to know what to do. In all cases, never move a patient with a broken neck, back, or pelvis, and watch out for signs of severe bleeding and shock. If you spend a lot of time camping or in the wilderness, you might want to think about taking a wilderness first aid course, which will provide you with the skills you need to treat a bone fracture until you can bring the patient to help or contact emergency services to request an evacuation.
When you suspect that someone has a bone fracture, try to keep the person calm and still. Any movement can be extremely painful, and if the patient gets upset, it could lead to shock. Assess the patient's general condition, in addition to the area of the fracture, and make sure that his or her airway is clear and that circulation is strong.
If the fracture is open, rinse the wound gently to flush out contaminated material. You should also flush any other wounds the patient may have. Whether the fracture is open or closed, you will also need to immobilize the area. In addition to reducing the patient's pain, this can cut down on the risk of internal bleeding and other complications. Immobilize a fracture by splinting it, and watch out for tight clothing, as the site of the fracture may swell, and clothing could cut off circulation.
If you notice swelling, you can use icepacks wrapped in towels to bring the inflammation down. Apply gentle pressure to stop any bleeding, if possible. While you offer first aid for the broken bone, remember that the patient may have other injuries which are not as obvious, so check in periodically to make sure that he or she is still responsive, and ask about any other areas of pain.
It is much easier for a medical professional to treat a bone fracture when he or she sees the patient immediately, so you should also call for help or have someone call for help while you care for the patient. If the case appears simple, like a broken arm, you can transport the person to the hospital in your own car as soon as the fracture is immobilized; if it looks complicated, call for an ambulance. In an incident like a car accident, it is better to wait for paramedics to arrive, as they can check for hidden injuries that could cause complications for the patient.