Yup, just open Preview for an image (possibly other documents as well e.g., PDF), go into “markup” mode, and begin to draw with the pen or pencil. Preview will try to “perfect” your drawn check mark, X, straight line, curved line, etc.
PDFs are more "baked" layouts rather than high level semantic markup, so it's not easy to automatically determine this. The AI is probably a set of heuristics.