There are literally thousands of different types of pasta in different shapes, sizes and colours. The shapes have evolved over the years to make the most of different types of sauces, some pastas holding chunky, ragout types better than others, and there does seem to be an unwritten code about which sauce should be served with a particular shape or variety of pasta.
The colours, apart from red, which is flavoured with tomato and the green flavoured with spinach seem to be more an affectation born outside Italy, as appearance is not as important to the discerning Italian diner as the taste. Other colours include gold, coloured with saffron ; flecked with added herbs ; mauve, with beetroot ; brown with mushrooms ; black, coloured with squid ink.
There are four basic types of pasta : tubular ; ribbon ; stuffed ; speciality and the add to variety they can be either long or short..

Pasta Lunga (long pasta)~
Usually made from plain flour and water paste, long pastas usually go well with smooth, clinging sauces that hold well together.
Spaghetti - probably the best known pasta, usually served with Bolognese or Neapolitan sauces in UK, but is excellent tossed in a good olive oil and lemon juice, sprinkled with freshly shaved Parmesan cheese or freshly torn basil.
Spaghettini - the 'ini' means small, and these thin spaghetti are ideal with thinner, spicier sauces.
Capelli D'Angelo - 'Angel Hair'. As its name suggests, these are very fine thread spaghetti and are used mainly in soups and broths. The egg variety make a lovely dessert pasta, like vermicelli.
Linguine - 'Small tongues'. Very popular in USA, their flat, slippery shape holds sauce well. A classic sauce uses clams.
Bucatoni/Bucatini - From central Italy, these are slightly thicker than spaghetti, with a hole through the middle, a little like drinking straws, their name deriving from bucati, or bored. Another name for them is periatelli and the large version are called bucatoni. They go particularly well with the more robust sauces such as sardine and fennel, or a spicy tomato sauce.
Fusili Lungi - 'long springs' - Like long telephone wires, they take nice chunky sauces, maybe with lots of colourful peppers and chunks of courgette and tomato.

Pasta Fettuce (ribbons)
Usually made with egg, the first flat shape of these pastas hold sauce well, having a greater surface area than the 'cord' pastas. They take most of the sauces designed for long pasta, plus creamier, clingy ones.
The best known is probably Tagliatelle in this country, its domensions - a width of exactly 8mm - are taken so seriously that the Chamber of Commerce of Bologna, from where it originates, have the perfect example of taglietelle caste in gold. Legend has it that it was devised to celebrate the golden locks of Lucretia Borgia, and its classic sauce partner is, of course, Bolognese, although in Verona it is accompanied by chicken livers and in the Marches, a mixture of nuts, chocolate and cinnamon. Their thinner siblings, Tagliolini, mere 2mm wide, are mainly used in soups.
Another Bolognese favourite is Parpardelle, also sometimes called Larghissime - 'very wide' which, at 2cm, it isbeing the widest ribbon pasta and can be either straight or saw edged. It is delicious served with game, such as hare, as it is in Tuscany, or with large chunks of poultry or offal in the sauce.
Feccucine, medium sized ribbon noodle at 5mm are well suited to creamy sauces such as Alfredo or a pesto. There is a slightly lighter version from Liguria called Trenette, using less eggs with a softer dough, which also works well with Pesto.
A combination of spinach and egg fettucine are known as Paglia e Fieno, 'Straw and hay', and they are usually served with a cream based sauce.
Tonnarelli, are the smallest of the ribbons at 1.5 mmsq and is a little like square spaghetti. In Abruzzio, where it comes from, it is called 'Maccheroni alla chitarra' or 'Guitar macaroni', because apparently the traditional method of making it is to press the dough through a guitar-like, wire-stringed tool with a rolling pin - 'Chitarra' means guitar. Like spaghetti, tonnarelli go well with meat sauces and ragu.

Tubi (Tubes)
A very popular type of pasta in Italy, as the cavities for trapping the solid bits in the sauce. In addition to the different sizes and shapes come the lisce (smooth) or rigate (ridged). Ridging is not merely a decorative affectation, by the way. It is a very effiecient way of increasing the overall surface area of the pasta, ensuring a covering of even more sauce.

Penne (Quills)
Refers to their pointed, nib-shaped ends, and come in varying sizes : Penne ; Penne ziti and Pennoni. They go well with a wide range of sauces, but especially the all'Arrabbiata from Lazio.
Cavatappi - corkscrews are hollow, stretched spirals that trap sauces beautifully and are very nice with a herby tomato and mushroom sauce.
Elicoidali - Helixes - are straight-edged tubes with curved ridges, Narrower but interchangeable with Rigatoni, large and chewy, a popular, classic shape which is slightly curved with sauces trapping ridges. Millerighe - Thousand ridges - are similar to rigatone except that they are straight and not curved. All are good with chunky, meaty sauces like all Norcina, a spicy pork sausage concoction or with lamb ragu. Garganelli are perhaps the tube pasta for the 'connoisseur'. The only tube pasta made traditionally by hand from egg dough and a speciality of Ella-Romagna. They are sometimes flavoured with nutmeg or parmesan and are exceptional with sauces which contain long vegetables which have been cut to mirror the size of the pasta, such as green or french beans or a creamy prosciutto and asparagus sauce.
Tube pasta, then, come in every size, from the small Boccolotti and Chifferi - also known as Gomiti in some areas because they are a bent elbow shape -mainly used in soups, to the Gigantoni - from the Italian for giants, with extra suffix 'toni' which means extra large, which are usually stuffed and baked like Canneloni.

Pasta Ripiena (Stuffed Pasta)
Perhaps the most famous of the stuffed pasta are Ravioli. The real ravioli, though, are noty the squidgy squares served in a sloppy sauce from cans, but neat little parcels whose fillings vary from region to region. They may have originated in Liguria, where sailors' wives set a tradition of stuffing pasta squares with foodstuffs to eat while their men were away at sea - a little like the Cornish tin miners' wives creating the Cornish Pasty. An even smaller version of the ravioli are Raviolini.

Agnolotti are round pasta, stuffed with meat or spinach and ricotta from Piedmont, created originally as a method of using up leftovers. Agnolini are half moon shaped, meat-stuffed pasta from Emilia-Romagna, cooked in chicken stock. All the 'pillow' pasta are delicious bathed in a smooth tomato and herb sauce or simply tossed in butter.

Tortellini are the small stuffed pasta from Bologna, reputed to have been made to resemble Venus' navel whilst Tortelloni are the larger versions. Confusingly, Tortelloni is also the name given to a large, flat ravioli-type pasta, called Tortelli in Emilia, usually stuffed with ricotta and spinach.

Cappelletti, or 'little hats'. another speciality of Bologna are just like tortellini, but made with square pieces of pasta, giving a characteristic 'pick' to the little 'hats'. A larger version from Ferrara in Emilia-Romagna, is Cappellacei, which are usually filled with a pumkin stuffing.

Canelloni, another of the familiar varieties here - large tubes of pasta stuffed with any of a variety of ingredients : Bolognese ; ricotta and spinach ; and even fish, then baked. This dish is thought to have originated in Piedmont and can be a true tube or simply a rolled rectangular sheet of pasta, such as those used in Lasagne, the classic dish to which it gives its name, layers of flat sheets of pasta, meat and cheese sauce, also known as 'Lasagna al Forno', oven cooked lasagna.
The Italian Riviera has contributed Pansoti, little triangles stuffed with ricotta and greens and served with walnut pesto, whose name means 'little bellies'.

Special Shapes
New shapes are being invented all the time, taking into account how the surface area may be increased to hold sauces, how crevices can be added to trap the chunkier pieces of food and how decorative or appropriate a shape can be to partner a partcular sauce.
Conchigilie - Their name means shells and that is exactly what they look like, ranging through the tiny Conchgliette for soups, medium bite size shells for sauces, to giant shells, served stuffed and baked.
Gnocchi also look a little like shells, although their ridges are wider and they hold sauce well. Gnochetti are less tapering with blunter ends and are also known as Riccioli, or curly. Another member of the gnocchi family, from Sardinia. Gnocchi Sardi are smaller and thinner. However, all these pasta gnocchi are not to be confused with the original, potato dumplings which bore that name, which are served with pesto or in broth.
Lumache - 'Snails' are so named because of their snail-like shape and, like the conchiglie family, they come in all sizes, growing to the large Lumacone or 'fat snail', which, like the other giant shapes is usually served stuffed and baked.
From Apilia in the south, come Orecchiette, 'little ears'. Traditionally made by hand from plain hardwheat dough, they are pressed by hand to form a ridge, and resemble small bowler hats.
Fusilli, the spirals sometimes referred to as Fusilli corti, 'short springs', Eliche or 'propellors' with a slightly looser spiral and Fusilli Bucati, which have a hole running through them, are all very versatile as shapes and lend themselves well to vegetable sauces.
Similar shapes are Gemelli - 'twins' - because they look like two pieces of pasta wrapped around each other, Casareccia, 'twists' and Radiatori, which look like little radiators and are all variations on the basic twist theme. Perhaps the most bizarrely name of this family are the Strozzapreti 'Priest stranglers', which take their name from a folk legend which tells of a gluttonous priest who choked to death whilst eating them.
Ruote de Carro - 'Cartwheels' are very popular in Sicily, again available lisce (smooth) or rigate (ridged) and lend themselves well to chunky, rich sauces such as Peperonata - peppers and onions.
Farfalle - 'bow-ties' are super sauce catchers and go well with plain tomato and butter sauce, but even better with salmon, fresh or smoked or tuna.
The very smallest shapes, Risi, resembling rice grains, Corallini, small rings, Ditalini, small thimble shapes and Stellini, small star shapes are all almost exclusively used in soups and broths and are rarely to be found accompanied by a sauces, except when served to small children, tossed perhaps in a simple butter and cheese dressing.
As already mentioned previously, these are but a few of the varieties and imaginative chefs and food manufacturers are adding new shapes, colours and flavours all the time to marry with ever more exciting sauces and ragus.