A statute is law written and passed by a legislative body. A code is a set of published statutes arranged by subject.
Understanding the history of legislation is constructed by examining bills, committee reports, hearings, and debates. Sometimes, you can find compiled legislative histories, which link to the relevant documents for a particular bill. Constitutional amendments do not have legislative histories, so you will need to find related documents yourself.