1. The junction tree algorithm is used to perform inference in graphical models. It involves constructing a junction tree from a graph, where cliques in the graph become nodes in the tree. 2. Message passing is then performed on the junction tree to calculate marginal and joint probabilities. Messages are passed from parent to child nodes involving updating beliefs based on the intersection of variable sets. 3. Common message passing algorithms include Shafer-Shenoy and Lauritzen-Spiegelhalter, which differ in how messages are computed and passed between nodes.