It's pretty easy to do, there are a couple ways of going about it:
First, you could hook up the case's front panel jacks to the X-Fi card, and it'll direct output to the front headphone jack when you plug 'em in. Unplug the headphones, and sound is directed to the rear outputs.
Alternately, you could have both the X-Fi and the onboard sound enabled, set the X-Fi as the default device (since AFAIK not all games allow you to change which audio device to use), and then use the settings in the music/media player programs to set output to the onboard sound. (The location of the setting varies, but every media software I've seen has a setting somewhere allowing you to choose the output device.)