Choosing a proper level of complexity for a prediction rule (model selection) or evaluating its performance (model assessment) are two fundamental steps in any supervised statistical learning application. Both steps require reliable estimates of the expected prediction error. After providing some general definitions related to the prediction error in regression and classification, attention will be focused on estimating this error by re-using the observed data. In particular, methods based on validation sets, cross-validation and bootstrap will be illustrated. Advantages and disadvantages of each technique will be discussed.