You can change classes every time you level up, if you choose, but you only have one class at a time. Even if you have the natural inclination to be a sorcerer (this natural inclination is assumed to be present in a character if the player wants it to be), you still have to work at developing it. Time you spend studying books and learning wizard-magic is time you’re not spending getting in touch with your inner dragonblood or whatever it is (or, for that matter, time you’re spending or not spending learning to swing a sword, or commune with the gods, or sing inspiring songs, or whatever). There’s no rule against taking levels of both sorcerer and wizard, but it’d be a bad idea, due to the way that spellcasters’ power increases with level: You’ll only have low-level spells available, not the much more potent high-level spells, and having more of the low-level spells is poor compensation.
That said, there are also a few prestige classes (classes that you can take levels in only after you’ve fulfilled some requirements from taking other classes) that let you advance multiple kinds of spellcasting at once. For instance, Tsukiko from Order of the Stick has the Mystic Theurge prestige class, which lets her advance as a cleric and as a wizard at the same time. This still puts you somewhat behind on your highest-level spells available, since you have to spend some number of class levels split between the two base classes, but it’s not as bad as splitting all of them.
For instance, a 16th level spellcaster who stuck with one class for the whole time (like wizard, sorcerer, or cleric) could cast 8th level spells, which are quite powerful (the most powerful spells are 9th). If that character had just split their levels evenly between their two classes, they might be (say) an 8th level wizard / 8th level cleric, which would give them a maximum of 4th level spells. And with a prestige class, you could do something like wizard 3 / cleric 3 / mystic theurge 10, which would let you cast as a 13th level wizard and as a 13th level cleric, giving you 7th level spells as each.
The core rules do not have any prestige class that lets you advance both wizard and sorcerer at the same time, but there is a class in one of the splatbooks (books beyond the core rules, but still officially supported by Wizards of the Coast) that does. It’s still debatable whether it’s worth it, though, since it doesn’t really give you all that much flexibility: Wizards and sorcerers have the same set of spells to choose from, anyway, so anything you can get from the combination, you could get just by staying with one class.