In a legal context, what does the term "conviction" refer to?
A) The process of appealing a court decision
B) The formal declaration that a defendant is guilty of a crime
C) The act of releasing a defendant on bail
D) The decision to dismiss charges against a defendant