You learned the difference between input and output operations. The cin and cout streams work as opposites: one brings data into your program, the other sends data out. Understanding this flow is core to writing interactive software.
I showed you how variables act as storage boxes with labels. You declare a variable with a type and name, then put values into it or take values out. The string type in particular holds text, which is perfect for names and messages.
The trick is that programs become useful when they respond to user input. Instead of always doing the same thing, your code can adapt based on what someone types.