You have two options:
If your sound card has a mic port, you can possibly use it as input. However, most of the time it's laggy and/or distorted.
A better solution is a hardware sound mixer. A sound mixer is just a piece of hardware that accepts multiple sound inputs and outputs. For example, your single set of speakers are the output, and your computer and xbox would be the input. They are compatible with anything that has (or can be converted to) RCA, 3.5mm (1/8 inch) stereo, or 6.25 (1/4 inch) stereo.
Here is a cheap one for an example. Don't spend more than $30 because you're only looking to mix two devices.
Another option is to get a few stereo splitters so that you can hook them both into the same thing, however that solution would only work for two devices going into one speaker system.