Harry Potter and the Chamber of Secrets is like most of the other movies in this series (and like most live-action movies period). It was filmed the old fashioned way with 35mm film.
Except it just had a whole bunch of special effects added in. (Sorry, these things aren't magic, you know.)
There are tons of shots in the film created using computer-generated images (or CGI). Obviously, the Quidditch match is totally computer-generated: Muggle actors can't fly. As far as creatures, Fawkes was created by a computer, but Aragog was an animatronic spider that the crew built to walk up on set. Spooky. The entire sequence with the Ford Anglia crashing into the Whomping Willow is CGI. (Bet Daniel Radcliffe and Rupert Grint are glad the film crew didn't try to do that one with practical effects.)
We're happy to report that basilisks aren't real, so Harry's fight scenes with the basilisk are almost entirely CGI. The only moment that isn't faked is when Harry stabs the creature through the roof of its mouth. Director, Chris Columbus thought that Daniel Radcliffe needed a monster to work with, so they built a basilisk head for him to attack. Hey, it scared us.