What Kor said.
Decades ago it was more common to order a pilot for a potential series. Sometimes these aired, most times pilots never did (there's a ton of pilots that never aired; you can find a few on Youtube).
Sometimes a pilot needed to be re-filed (maybe certain cast members weren't working out or wanted too much money, etc., or moved on by the time the pilot was to be shown for a potential series). Examples of re-filed/re-cast pilots include (this doesn't necessarily mean a full re-film): "Buffy the Vampire Slayer" and "Full House". Sometimes minimal scenes are changes and little things cut, like the original "ALF" pilot (which I think has some positives that shouldn't have been cut).
Other times a pilot may have had good idea or premise but major changes were needed, meaning a whole new pilot. Sometimes two or three versions of a pilot will be done and none of them will air. An example of that was a 1960's thing called "Man on the Beach", which had two (maybe three) pilots filmed. One scored by Jerry Goldsmith and another by Billy May; never have aired. I don't think anybody outside of those who worked on it, have seen either.
These days networks still don't pick up a number of pilots (probably half of which never air) but when they are interested in something, typically they'll order half a season or even a full season, so no "pilot" in the old sense, is needed. Though there have been series that filmed half or more of a season and didn't air at all (there was a UPN series, for example, that filmed I think thirteen episodes, and the plug was pulled and it never aired; don't recall the name off hand).
There are even series where one episode might air and the rest, though filmed and ready, are not aired because it bombed I[]so badly[/I]. Two examples include:
"Public Morals"
A detective series that so offended public viewing morals, only the first episode aired out of thirteen made.
"Heil Honey, I'm Home"
What's funnier than making a series about Hitler and his wife? How about a comedy series? And what would be even worse? Making and airing it in a country Hitler almost wiped off the face of the Earth. You can imagine, it didn't last long. In fact, on episode out of eight, was shown.
There have also being series ordered -- I don't know how often this happens -- that get canned in the middle of filming episodes, even though ordered as a series. One such example was a mid 1990's potential series trying to capitalize on other shows at the time like "Nash Bridges" and Martial Law"; it was called "Lawless" and the networked cancelled it while episodes were filming. One director told me none were completed, but by some miracle, one episode was and it aired. (coincidently, Joel Goldmsith was working on this failed series and also submitted a demo for a season six theme for NB).