From Wookieepedia, the Star Wars wiki.
A battle droid (also referred to as war droid, killer droid or clanker) was any droid designed for combat.
There were numerous types of battle droids. They predated the Galactic Republic by thousands of years, with the earliest known being Rakatan ancient droids and the war-robots used by Xim the Despot.
Many of the best known battle droids were those used by the Confederacy of Independent Systems during the Clone Wars.
By the time of the Battle of Yavin, however, battle droids were extremely rare, most likely due to the Clone Wars, or because the Empire didn't want an army that could be easily built and used against it.
Types of battle droids
B2 super battle droids precede B1 battle droids into battle on Geonosis