If you earn a salary you must pay National Insurance contributions (NICs), which entitle you to a state pension.