In a terminal window, you can type CTRL-W N (with upper case N) to switch the terminal to normal mode, where you can then move in the buffer and copy things in the terminal buffer using regular vim commands. You can go back to typing commands in the terminal by typing i or a (as when going in insert mode). You can paste in the terminal using CTRL-W " followed by the register name.
See :help terminal