In RStudio, pressing Ctrl/Cmd + Enter on a line will send it to the console and execute it. If it's preceded by any comments, those will be sent as well. This looks like it may be a screenshot of an Rmarkdown document. Is that the case? If so, the code you write needs to be surrounded with three backticks above and below. Try pasting this into your document and pressing Ctrl/Cmd + Enter while your cursor is on the print() line.
```{r}
print("Hello rmarkdown!")
```