Assuming it's a Mac that can boot OS 9, just install OS 9 as you would normally (don't do an erase and install though), and it will install alongside OS X. You'll then be able to boot OS 9, and also Classic mode in OS X will be enabled (assuming it's 9.2). I did this with my Power Mac G4, and it worked fine.