Macrophages are part of the immune system. They are mainly found in the liver and in the lymph nodes (including the spleen), although they may be found in all tissues. A primary function of a macrophage is to clear the blood of particles, including bacteria. They work by eating whatever they don't recognize as healthy tissue, including pathogens and the organism's own dead cells. In fact, the etomology of macrophage is Greek "big eater." They present fragments of whatever they have eaten, called antigens, on their outer surface where eventually a helper T cell will notice it and release a lymphokine notification to the B cells. The B cells then create and release antibodies specific to the particular antigen, and hence to the pathogen, which will bind to the latter. Macrophages again come into play because they are especially attracted to cells with antibodies attached.
Macrophages come from monocytes that circulate in the blood stream, after spending about a day in this form. They can survive in the tissues for several months, and it some circumstances can be triggered to divide.
Their main role is the demolition of necrotic tissue, and in the later stages of inflammation. (The early stages of inflammation are predominated by neutrophils.)
Macrophages are sometimes known by different names depending on where they are found. This is largely for historic reasons, as originally they were not known to be the same cell. Microglia are macrophages in the brain, and Kupffer cells are macrophages in the liver.