Confusion Matrix is a classification matrix used in supervised learning. Confusion matrix is helpful when one wants to evaluate the performance of a classifier or Machine Learning algorithm.
It gives a good comparison of the predicted and real/actual values. These values are then used to understand how many correct predictions were made by the algorithm and how many incorrect predictions were made.
It is thus a report card of the classifier.
Contingency tables are used to analyze the relation between two or more categorical variables. A contingency table displays the frequency of specific combinations They are used to summarize the relationships and not to evaluate the model. Thus, one can easily compare and study whether the distribution of one variable is conditionally dependent on other variable.
Contingency tables are used to determine the Support and Confidence of association rules, and hence to assess them.