Given a spectral triple with some conditions(such as the algebra is commutative), Connes's reconstruction theorem states a we can recover a Riemannian manifold with spin structure.(see here)
Now I have read about this, and I am confused, is the KO dimension of spectral triple equal to the dimension of the manifold?
No. Let $X$ be a compact oriented Riemannian manifold. Let $\chi$ be the $\mathbb{Z}_2$-grading on the complexified exterior bundle $\bigwedge T^\ast_{\mathbb{C}} X$ given by the parity of the degree of a differential form, and let $J$ be the fibrewise complex conjugation on $\bigwedge T^\ast_{\mathbb{C}} X = (\bigwedge T^\ast X) \otimes_{\mathbb{R}} \mathbb{C}$. Then $(C^\infty(X),L^2(X,\bigwedge T^\ast_{\mathbb{C}} X,d+d^\ast,\chi,J)$ is a real spectral triple of $KO$-dimension $0$ no matter what $\dim X$ is. If you’ll forgive the grotesquely shameless self-promotion, for more discussion of this fundamental de-coupling between $KO$-dimension and other notions of dimension, see this paper.
There was a time when it was assumed that $KO$-dimension really did need to line up with other notions of dimension, but this idée fixe was broken by the papers of Chamseddine–Connes–Marcolli and Barrett, who observed that a decoupling of $KO$-dimension from other notions of dimension was essential for modelling the (classical gauge theory of) the Standard Model.