What are the primary reasons for color cast? Can the (quality or lack of quality) of a lens cause color cast?
Finally, does custom white balance solve all color casting issue?
Color cast is a difference between what you see in the image and what you expected to see.
That occurs because the camera records light always in a fixed way but the human brain does not. Our brain interprets colors with the knowledge of what it should be. This is why we see a white wall under yellowish light as white. Only the camera measures this and sees yellow. The white-balance system compensates for this by trying to make the yellow wall white.
Custom white-balance lets the photographer show the camera what should be white and the camera deduces the color of lighting from that. It them applies that information to the entire image. This usually works most of the time but can fail under mixed lighting or when the target is not actually pure white.
When a color-cast is not caused by the white-balance system, custom white-balance does not correct it. This can happen for example at high-ISO sensitivities when the sensor has more noise in one channel for example, the image will take on a cast even if custom white-balance was used.