If you're out of work and receiving benefits then your National Insurance contributions will be paid by the state.
If you're unemployed and not in receipt of benefits then there is no legal obligation upon you to pay National Insurance contributions. However, you need to pay a minimum amount of National Insurance within any one tax year for it to count as a 'qualifying year' towards ensuring that you will recive the full state pension upon retirement. (You also need to ensure that there are a sufficient number of qualifying years accrued before you retire).
If you don't pay sufficent National Insurance within a tax year then, 18 months after the end of that tax year, you will get a letter advising you of that fact. It isn't a bill and you're free to ignore it if you wish to do so. The letter will, however, advise you as to how you can make a voluntary payment of National Insurance contributions in order that the relevant tax year will then count as a qualifying year towards your state pension. As I've said, you don't have to pay anything but, if you're worried about your pension, you can make those voluntary contributions at any time up until 6 years after the end of the relevant tax year.
If this still isn't clear, or you want to discuss your particular circumstances, phone the National Insurance helpline: 0845 915 5996
Chris