Well, I have different thought on this than others.
A heuristic is a method to get the solution to problems without trying all possible solutions, or without getting to know the answer ahead of time. Therefore a heuristic gives a solution to a problem faster when classic methods are not that fast, or finds an approximate solution when classic methods fail to get any proper solution to the problem.
Generally, whenever we try to find a solution for a problem, we come up with a solution for it by ourselves. We could have figured a way to solve it with classic methods, or through the use of some heuristic. The way we used to solve it is not the solution to the problem, but the technique we came up with that enables us to get the solution to the problem. We can then teach others this technique so that they too can then apply it to the problem and arrive at the solution.
So now, we could choose to teach this technique to a machine, by implementing it as some algorithm that the computer can frequently use. Once we have that, the computer can solve the problem using our own technique, which could be a heuristic based technique or not.
Machine Learning is completely different, in this rather than teaching the computer the technique that you found for solving the problem, you actually make the machine learn the technique that allows it to find its own technique for solving the problem. Machine Learning algorithms help machines to find out the solution for a problem. Those machine learning algorithms can themselves be heuristic based, and often are. But those techniques don't directly find the solution to the problem. Rather they allow the computer to come up with a technique for solving the problem from its own.
So this was the basic difference.
If you want to become an expert in Machine Learning, checkout this Machine Learning Certification Course offered by Intellipaat.
See this Machine Learning Course for more information :