The methods of evaluating the accuracy of a model differ between supervised learning and unsupervised learning.
In a typical linear regression (where continuous values are predicted), there are a couple of ways of measuring the error of the model. Typically, error is measured on the validation and testing datasets, as measuring error on a training dataset (the dataset using which a model is built) is misleading. Hence, error is always measured on the dataset that is not used to build a model.