We present an introduction to the theory of algebraic geometry codes. Starting from evaluation codes and codes from order and weight functions, special attention is given to one-point codes and, in particular, to the family of Castle codes.