This trick requires a mushroom. The Blue Shell goes up and comes down. Before it hits, you will have time to use a mushroom and avoid the shell. You should boost forward and the Blue Shell should explode behind you.
You must be in first place to get a Blue Shell targeted at you. This trick also requires some sort of speeding item, such as a Speed Mushroom. Once the Blue Shell is above your head, use the speeding item just before it descends. It will make a large explosion behind you, but will miss. You can also avoid them by using the following tricks on the listed courses:
DK Summit: Go through the DK Cannon.
N64: DK's Jungle Parkway: Go over the ramp the jumps over the yellow river.
GCN: DK Mountain: Go through the DK Cannon.
Rainbow Road: Go through the tunnel with the giant stars on each end.