On a fresh installation of RStudio, you will need to install knitr. When you open an R Markdown doc our notebook (or try to knit it), the IDE will prompt you to install the required packages.
You can just use base R to knit .Rmd files, the RStudio IDE isn't required.
A good place to understand how R Markdown works for yourself is here: