How to put a copied command in a command block?

You can use Copy and Paste.

Highlight the text you want to copy and press Ctrl-C (Command-C on a Mac). To paste it, press Ctrl-V (or Command-V).