A battle droid is a droid designed for combat. They fill all roles on the battlefield, from the AIs that assist the operation of warships and starfighters in space, to armor, air support, and infantry on the ground. The most common kind are those that replace living beings as infantry owing to the large number of soldiers required for interplanetary (to say nothing of intragalactic) war.
Battle droids make very efficient war machines, as their mechanical components and dedicated design typically out-perform living creatures for their particular combat roles. While physically capable, however, battle droids typically lack much capacity for original thinking, allowing living troops to outmaneuver them if they are not carefully lead.
Prior to the formation of the Galactic Empire, battle droids were very common, as unlike living beings they could be rapidly mass produced. This allowed massive armies to be fielded quickly and secretly, as the Confederacy of Independent Systems did when they created their droid army. The appeal of the technology diminished following the atrocities of the Clone Wars and the unveiling of the Kaminoan cloning technology that let the Galactic Republic field the Grand Army of the Republic, which proved to be superior to the droid army.