Hello, and welcome to the RStudio Community Forum.
You need to do a bit of homework - remember "Google is your friend"!
Check out for following link for how to read netCDF files into R:
http://geog.uoregon.edu/bartlein/courses/geog607/Rmd/netCDF_01.htm
Once you have your data imported, you can set about calculating averages - I suggest you use the {dplyr} package. See this link for an introduction:
https://cran.r-project.org/web/packages/dplyr/vignettes/dplyr.html
If you get stuck and want more detailed help you should work on making a "reprex" (reproducible example) including a small bit of your data and the R code that you have tried. Read up on this here:
https://www.tidyverse.org/help/
HTH