AI is used in predictive maintenance by collecting and analyzing data from sensors and systems, using machine learning algorithms to identify patterns and predict equipment failures, creating predictive models, and triggering maintenance activities based on real-time condition monitoring.