General guidelines are as follows:

Gram positive cocci – vancomycin
Gram negative cocci – Ceftriaxone
Gram negative bacilli – Ceftriaxone, cefotaxime, or ceftazidime
Gram stain negative and immunocompetent – vancomycin
Gram stain negative and immunocompromised – vancomycin + third generation cephalosphorin
IV drug use (possible pseudomonas aeruginosa) – ceftazidime +/- an aminoglycosideOnce cultures are available, antibiotics can be changed to target the specific organism. After a good response to intravenous antibiotics, people can be switched to oral antibiotics. The duration of oral antibiotics varies, but is generally for 1–4 weeks depending on the offending organism. Repeated daily joint aspiration is useful in the treatment of septic arthritis. Every aspirate should be sent for culture, gram stain, white cell count to monitor the progress of the disease. Both open surgery and arthroscopy are helpful in the drainage of the infected joint. During surgery, lysis of the adhesions, drainage of pus, and debridement of the necrotic tissues are done. Close follow up with physical exam & labs must be done to make sure the person is no longer feverish, pain has resolved, has improved range of motion, and lab values are normalized.In infection of a prosthetic joint, a biofilm is often created on the surface of the prosthesis which is resistant to antibiotics. Surgical debridement  is usually indicated in these cases. A replacement prosthesis is usually not inserted at the time of removal to allow antibiotics to clear infection of the region. People that cannot have surgery may try long-term antibiotic therapy in order to suppress the infection.
This is because in both the hip and shoulder joints the metaphysis is intra-articular which in turn facilitates the spread of hematogenous osteomyelitis into the joint cavity. Conversely, joint sepsis may spread to the metaphysis and induce osteomyelitis. Acute exacerbation of juvenile idiopathic arthritis and transient synovitis of the hip both of which are non-septic conditions may mimic septic arthritis. More serious and life-threatening disorders as bone malignancies e.g. Ewing sarcoma and osteosarcoma may mimic septic arthritis associated with concurrent acute hematogenous osteomyelitis. In this regard, Magnetic resonance imaging may play an important role in the differential diagnosis. Joint aspiration
In children, joint synovial fluid aspiration techniques aim at isolating the infectious organism by culture and sensitivity analysis. Cytological analysis of the joint aspirate can point to septic arthritis. However, a negative culture and sensitivity test does not rule out the presence of septic arthritis. Various clinical scenarios and technique-related factors may impact the validity of results of the culture and sensitivity. Additionally, results of cytological analysis, though important, should not be interpreted in isolation of the clinical settings. In the joint fluid, the typical white blood cell count in septic arthritis is over 50,000-100,000 cells per 10−6/l (50,000-100,000 cell/mm3); where more than 90% are neutrophils is suggestive of septic arthritis. For those with prosthetic joints, white cell count more than 1,100 per mm3 with neutrophil count greater than 64% is suggestive of septic arthritis. However, septic synovial fluid can have white blood cell counts as low as a few thousand in the early stages.