ELI5- What happens to atoms and molecules when a log burns?

r/

ELI5- What happens to atoms and molecules when a log burns?