What type of instrument is a "code"? There seems to be an underlying statute, the Road Traffic Act, that it implements but what is the purpose of having a separate code?
The Highway Code is a Ministerial Direction that brings together in one place for easy reference legislational requirements (by the the use of "must" and "must not") and general guidance (by the use of "should" and "should not") for all road users.
It's origins are section 45 of the Road Traffic Act 1930:
Issue by Minister of directions for guidance of users of roads.
(1)The Minister shall as soon as may be after the commencement of this Act prepare a code (in this section referred to as the " highway code ") comprising such directions as appear to him to be proper for the guidance of persons using roads and may from time to time revise the code by revoking, varying, amending or adding to the provisions thereof in such manner as he thinks fit.
(2)The highway code and any alterations proposed to be made in the provisions of the code on any revision thereof, shall, as soon as prepared by the Minister, be laid before both Houses of Parliament, and the code or revised code, as the case may be, shall not be issued until the code or the proposed alterations have been approved by both Houses.
(3)Subject to the foregoing provisions of this section, the Minister shall cause the code and every revised edition of the code to be printed and issued to the public at a price not exceeding one penny for each copy.
(4)A failure on the part of any person to observe any provision of the highway code shall not of itself render that person liable to criminal proceedings of any kind, but any such failure may in any proceedings (whether civil or criminal, and including proceedings for an offence under this Act) be relied upon by any party to the proceedings as tending to establish or to negative any liability which is in question in those proceedings.
This Direction remains in force to this day by virtue of section 38(1) of the Road Traffic Act 1988:
1)The Highway Code shall continue to have effect...
To add to Rick's great answer:
"what is the purpose of having a separate code?"
There are two main reasons. The first is similar to the reason that we have secondary legislation: it enables the law (or in this case, the guidance) to be kept up to date relatively easily and quickly compared to what it takes for Parliament to pass an Act. If all law were contained in Acts then it would be much more rigid and outdated as society evolves due to the difficulty in making changes. By allowing for secondary legislation, an Act can empower some other person or entity to modify certain rules within a narrow scope defined in the Act.
The second reason is that legislation is typically quite complex and difficult for laypeople to parse. Many Acts contain a requirement for guidance to be published in order to make the rules more accessible to the public (and therefore more likely to be followed). Consider how many times an average non-lawyer has studied an Act of Parliament in their lifetimes vs. reading some guidance on a government website.