The ID3 algorithm builds decision trees using a top-down, greedy search. It uses entropy and information gain to determine the attribute that best splits the data. The algorithm is demonstrated on a weather dataset to predict whether it is suitable for playing ball. Entropy is calculated for each attribute to determine which has the highest information gain to become the root node, which is found to be the outlook attribute. The tree is then grown further by calculating entropy for the subsets based on outlook.