There are a number of differences, and how you want to use the speakers determines whether computer speakers or a stereo system can do the job.
Listening Space
There are three distinct ranges of listening space that need different solutions. Headphones are near zero distance from your ears. A wide bandwidth of sound can be reproduced with a single, small transducer (the internal component that produces sound from the electrical signal), using minimal power, and the sound is efficiently channeled to your ears.
With a computer setup, the speakers are arm's length away and you can position them on both sides of your head to reproduce a stereo image. As soon as you lose the direct acoustic coupling of headphones, you introduce additional requirements for the speakers if you want music to sound good. You generally need multiple transducers to cover the different sound bands and you need a lot more power than headphones.
The sound is localized. You can hear good, stereo sound at your computer, but at greater distances, you lose the stereo separation and the volume drops off quickly. Computer workspace is usually limited, which means small speakers. That's fine for mid- and high-range sound. Those requirements can be met with small speakers. If you want deep bass notes, you will need a larger speaker, even at that listening distance. High-end computer speakers will have a separate “larger” woofer for low-band sound. Because low-band sound is not sensed as directional, the woofer can be placed out of the way without seriously degrading the sound quality.
If your listening space is a room, several things change. To reproduce a stereo image, the speakers need to be a lot farther apart. To fill the listening space with sound, you need to move a lot more air. Mid- and low-range transducers need to be bigger and you need a lot more power.
Coupling the transducers to the room air at that scale can involve arrays of speakers, shaping the surface of the speaker cabinet or sending the sound through shaped channels, like horns. Sound reflections and travel time become important, so speaker placement relative to walls and furniture can make a big difference. At this scale, different styles and sizes of transducers are needed for different sound bands. It is common to have transducers of at least three specialized types (high, mid-band, and low), and this is sometimes broken into as many as five bands, each with transducers optimized for that range of frequencies.
If you are talking about audiophile equipment, that is still the province of full-sized stereo systems. It takes much more sophisticated designs to ensure that sound is reproduced evenly across the entire audio spectrum, everything is perfectly phased (wavefronts from the different transducers reach your ears at the same time), there are no resonances, the speaker materials don't color the sound, etc.
Speaker Design
There are some basic differences in speaker design between computer speakers and a home stereo. Physical size was already mentioned, as was the fact that home stereo speakers are likely to have a greater number of specialized transducers and more complicated and heavier cabinet designs. You can buy computer speakers that rival a mid-range home stereo in terms of sound quality, but they aren't scaled in terms of transducer size or power handling to replace a home stereo.
Power requirements drive another difference. The on-board sound card in your computer has a very low-powered amplifier that is adequate to power small, efficient speakers in the mid and upper bands of sound that you will listen to from a short distance away. For people who don't care about sound quality and just want a source of audio output, such simple speakers are available.
Most computer speakers that can reproduce something you would call music and can do it loudly enough to be listened to in the general vicinity of the computer will be powered speakers. These contain their own amplifier and you have to plug them into a wall outlet.
The kinds of speakers that are used with a home stereo require even more power. Low frequency sound, which tends to be lacking on computer speakers, requires moving a lot of air, which takes more power, and all of the transducers are generally larger because of the listening space these are designed for. Also, speakers that reproduce a full high-fidelity sound bandwidth, accurately across the whole spectrum, tend to be less efficient (more power required for the same sound volume).
In a home stereo, the amplifier is a separate component, which generally is more powerful, produces less distortion, and often has more controls for customizing the sound. The exception is that some sub-woofers have their own built-in amplifier that is designed for that job.
Interfacing
Connecting computer speakers is a little different from connecting the computer to a home stereo. The amplifier built into the computer speakers is designed to connect to the speaker output of the computer, which is a low impedance source. With this connection, the signal has already passed through the on-board amplifier, so there is some degradation from that extra processing step.
The amplifier of a home stereo connects to the audio output on the computer. This is a standardized audio signal interface that has different impedance and voltage levels from the speaker output, and bypasses the built-in amplifier. Using this interface, the sound quality will be comparable to feeding the stereo any decent analog source, like a component music CD player. If you are an audiophile, you might connect the stereo to a digital output on the computer, which would be un-degraded from the source material.
Bottom line, the primary difference that drives all of the other differences is how much air they move.