Difference between convex and non-convex cost function; what does it mean when a cost function is non-convex?

A convex function: given any two points on the curve there will be no intersection with any other points, for non convex function there will be at least one intersection.

In terms of cost function with a convex type you are always guaranteed to have a global minimum, whilst for a non convex only local minima.