The correct technical terminology of these pieces is "fragmentation" (sometimes shortened to frag) - although "shards" or "splinters" can be used for non-preformed fragments. Preformed fragments can be of various shapes (spheres, cubes, rods, etc.) and size and are normally held rigidly within some form of matrix or body until the HE filling is detonated. The resulting high velocity fragments produced by either method are the main lethal mechanisms of these weapons, rather than the heat or overpressure caused by detonation, although offensive grenades are often constructed without a frag matrix. These casing pieces are sometimes incorrectly referred to as "shrapnel," though this is mainly due to ignorance of the correct terminology, as shown by these journalistic references. 
The use of fragmentation in bombs dates to the 14th century, and appears in the Ming Dynasty text Huolongjing. The fragmentation bombs were filled with iron pellets and pieces of broken porcelain. Once the bomb explodes, the resulting shrapnel is capable of piercing the skin and blinding enemy soldiers.
For this bomb you take tung oil, yin hsiu, salammoniac, chin chih, scallion juice, and heat them so as to coat a lot of iron pellets and bits of broken porcelain. Then fill in (with a gunpowder core) to a case of cast iron making a fragmentation bomb. When it bursts it breaks into pieces which wound the skin and break the bones (of enemy soldiers) and blinds their eyes.
The modern fragmentation grenade was developed during the 20th century. The Mills bomb, first adopted in 1915 by the British army, is an early fragmentation grenade used in World War I. The Mk 2 grenade was a fragmentation grenade adopted by the American military based on the Mills bomb, and was in use during World War II.
Difference between fragmentation and shrapnel 
The term shrapnel is often incorrectly used to refer to fragments produced by any explosive weapon. However, a shrapnel shell functions differently from a high explosive shell. A shrapnel shell consists of a shell casing filled with steel or lead balls, with a small explosive charge at the base of the shell and a nose fuse. When the projectile is fired, it travels a pre-set distance before the fuse ignites the explosive charge (often black powder) in the base of the shell. The fuse also typically fractures the nose of the shell to open a path for the balls. Upon ignition, the explosive charge breaks up the shell releasing the balls. These balls continue in a forward 'cone' with most of their energy coming from the velocity imparted by the gun. In a high explosive shell, the energy comes primarily from the explosion of the shell itself - one comparison would be that a high-explosive shell would be as dangerous if detonated whilst stationary, whereas a shrapnel shell would not.
The casing of a shrapnel shell does not fragment like a high explosive shell, thus, technically, the balls shot from the shrapnel shell are "shrapnel" whereas the pieces of shattered shell casing of a high explosive shell are "fragments" or "splinters." 
Another artillery round similar to shrapnel is canister, sometimes called case shot. Canister is a simple sheet metal casing filled with steel or lead balls. Upon firing, the casing fractures as it exits the muzzle of the gun and dispenses the balls from the gun’s muzzle much like a shotgun. The practical differences between canister and shrapnel is that canister is only effective at short range (less than 200 yards/183m), whereas a shrapnel shell can travel hundreds of meters downrange before the fuse activates the explosive charge, thus it can be effective at much longer ranges.
The key difference between shrapnel and fragmentation is that shrapnel relies on the kinetic energy of the shell for its destructive capability - whereas a fragmentation shell is essentially as destructive if detonated when stationary.
Gallery of images 
Artillery shell fragment from the Gulf War
- "..shrapnel doctors removed from his knee after the humvee he was riding in hit a land mine..", US DOD
- "...An anti-shrapnel netting could reduce the damage done by explosive blasts...", US Air force
- "...The shrapnel had penetrated his chest and lung ...", UK Ministry of Defence
- Joseph Needham (1986). Military Technology: The Gunpowder Epic. Cambridge University Press. pp. 180–181. ISBN 978-0-521-30358-3.
- The New Weapons of the World Encyclopedia: An International Encyclopedia from 5000 B.C. to the 21st Century. St. Martin's Press. 21 August 2007. p. 88. ISBN 978-0-312-36832-6.
- U.S. War Department Technical Manual 9-1900 ‘'Ammunition, General'’. 18 June 1945. p. 106. Available: http://90thidpg.us/Reference/Manuals/index.html
- http://www.history.army.mil/faq/shrapnel.htm%7CWhat is the difference between artillery shrapnel and shell fragments Aemy History
- U.S. War Department Armored Force Field Manual 7-12, ‘'Tank Gunnery'’. 22 April 1943. Available: http://www.ahco.army.mil/site/index.jsp