They are two different conditions, but both are autoimmune diseases that attack the body in a similar fashion, which can lead one to believe he or she may have lupus when they have rheumatoid arthritis, and vice versa.
Autoimmune diseases are characterized by a malfunction of the immune system. It can't distinguish between the body's own cells and tissues and that of foreign matter, like viruses. Rather than simply producing antibodies to attack antigens (viruses, bacteria and other invaders), the immune system creates auto-antibodies that instead attack one's own tissues and organs.
Rheumatoid arthritis causes pain, swelling, stiffness and loss of function in the joints. It is most common in the wrist and fingers, but can affect any joint. More women than men get rheumatoid arthritis, and the onset is often between ages 25 and 55.
Rheumatoid arthritis can affect the body beyond the joints, attacking the eyes, mouth and lungs. Its cause is unknown, but genes, environment and hormones might contribute to the disease.
Lupus takes on several forms and can affect any part of the body, but most commonly attacks the skin, joints, the heart, lungs, blood, kidneys and brain.
Source: Rheumatoid Arthritis. U.S. National Library of Medicine. National Institutes of Health.