What does by and by mean?

The phrase means "hereafter", "later". Hence its usage in old Christian hymns,
"In the sweet by-and-by..." It is also used to mean "later", as in "see you later".