When you first register for VAT, you will register on either a cash receipts or invoice basis for VAT.
This determines the VAT period in which you must pay VAT.
IF you are on invoice basis, then at the end of the VAT period you must pay over all the VAT on Sales Invoices you have issued, whether you have gotten paid for them or not.
If you are on Cash Receipts basis, you do not need to pay over the VAT until you reach the end of the VAT period where you got paid for the invoice.
More explained here:
How to find out what basis you have been registered on ROS: