The dynamics and statistics of knots in biopolymers