How do you calculate the training error and validation error of a linear regression model?
Yes. Yes. The test set is used to get an unbiased measure of the performance of your model. This is explained in many sources, better than I can explain here; I won't try to repeat them. See, e.g., https://en.wikipedia.org/wiki/Training,_validation,_and_test_sets, https://stats.stackexchange.com/a/104750/2921, or standard textbooks.