Cross-validation
How well does a model predict new cases? In cross-validation the data are split into parts. In turn the model is fitted without one part and checked on that part. The mean error there estimates the quality for new data.
Example: 5-fold with 100 cases: 5 rounds, each with 80 cases for fitting and 20 for checking.
Caution: Selection steps (variables, penalty strength) belong inside every round. Otherwise the estimate comes out too favourable.