A castle nut, or castellated nut is a specialized nut that is sometimes used on motorcycle axles, swingarms or any application where it is crucial that the nut not be permitted to vibrate off.
Generally the end of the bolt where the castellated nut threads on will have a hole drilled through it. Since the nut is notched it allows a mechanic to tighten up a bolt and align one of the notches in the nut with the hole in the bolt. This way a cotter pin can be inserted through the nut and bolt and bent over. The cotter pin prevents the fastener from coming apart.