The following pages on Gov.uk give the basic outline for claiming R&D tax credit
Overview
Claiming R&D tax relief for SMEs
Claiming R&D tax relief for large companies