A heuristic is a function that outlines from problem state description to measures desirability, usually represented as number weights. The value of a heuristic function at a given node in the search process gives a good estimate of that node being on the desired path to the solution. Well-designed heuristic functions can provide a fairly good estimate of whether a path is good or not. Let us say that the total of all the distances covered so far is a simple heuristic function in the traveling salesman problem. The main objective of a heuristic function is to guide the search process in the most profitable directions, by suggesting which path to follow first when more than one path is available.
For example, the query might be finding the shortest driving distance to a position. A heuristic cost would be the straight line distance to that particular position. It is simple and fast to calculate, an important feature of most heuristics. The actual distance would likely be higher as we have to stick to roads and is much harder to calculate.
If you are looking to learn more about Artificial Intelligence then visit this Artificial Intelligence Course which will cover topics like Euclidean distance, Pearson Correlation Coefficient, Brute Force Algorithms, traveling salesman problem, NeuroEvolution of Augmenting Topologies, Fitness Function, Resolution Algorithm,k-nearest neighbors algorithm, Markov Model, Genetic Algorithm,deep first iterative deeping and many more.