What do defense attorneys do?

They are hired (or are appointed by a court) in order to prove a defendant's innocence.

Answer

Criminal defense attorneys represent criminal defendants, through all steps of prosecution. They protect the rights of the accused, advise the accused on the relevant law and procedure, and if necessary, represent the accused at trial.