An affidavit is a formal sworn statement of fact, written down, signed, and witnessed (as to the veracity of the signature) by a taker of oaths, such as a notary public.
One use of affidavits is to allow evidence to be gathered from witnesses or participants that may not be available to testify in person before the court. In some countries, criminal defendants routinely execute anyone that testifies or will testify against them.
In American jurisprudence, it is very unusual to allow an unsupported afidavit to be entered into evidence with regard to material facts which may be dispositive of the matter at bar. Affidavits from persons who are dead or otherwise incapacitated, or who cannot be located or made to appear may be accepted by the court, but usually only in the presence of corroborating evidence. An formerly written affidatvit, which reflected a better grasp of the facts closer in time to the actual events, may be used to refresh a witness' recollection. Materials used to refresh recollection are admissable as evidence.
Some types of motions will not be accepted by acourt unless accompanied by an independent sworn statement or other evidence, in support of the need for the motion. In such a case, the court will accept an affidavit from the filing attorney in support of the motion, as certain assumtions are made, to wit: The affidavit in place of sworn testimony promotes judicial economy. The lawyer is an officer of the court and knows that a false swearing by him, if found out, could be grounds for severe penalty up to and including disbarment. The lawyer if called upon would be able to present independent and more detailed evidence to prove the facts set forth in his affidavit.