To stray from a subject or theme.
To wander about.
To get distracted and lose track of something (one's train of thought, a conversation).