Here are some thoughts which are essentially a complement to Branimir's answer. In many naturally occurring examples, in particular the theory of quantum groups, it is actually more natural to start with a noncommutative cotangent bundle and to then construct the spectral triple from it. More explicitly, start with a pre-$C^*$-algebra $A$ whose noncommutative geometry you are trying to understand.

 1. Look for a dga (differential graded algebra) $\Omega^{\bullet}$ for which $A = \Omega^0$. 

 2. Endow $\Omega^{\bullet}$ with some type of ``Riemannian metric'', which is to say an inner product $\langle \cdot,\cdot \rangle$.

3. Confirm that the differential d of the dga is adjointable $\langle \cdot,\cdot \rangle$. Denote by d$^*$ the adjoint of d.

4. Complete $\Omega^{\bullet}$ to a Hilbert space.

5. Check that $D:=$d$+$d$^*$ is a closable operator, and that the closure satisfies the axioms of a spectral triple.

I should stress that this is a rough plan of attack, and will only work in situations which are, in some sense, close to the classical situation. For example, $q$-deformed $C^*$-algebras, in particular examples coming from Drinfeld-Jimbo quantum groups. 

The prototypical example here is the Podles sphere $\mathcal{O}_q(S^2)$, the degree zero part of a $\mathbb{Z}$-grading on $\mathcal{O}_q(SU_2)$, which $q$-deforms the algebra of algebraic functions of the $2$-sphere. This pre-$C^*$-algebra admits an essentially unique $\mathcal{O}_q(SU_2)$-covariant dga, called the Podles calculus. The calculus carries a $q$-deformation of the Fubini-Study metric, with respect to which $d$ is adjointable, and which gives a spectral triple upon completion of $\Omega^{\bullet}$ and closure of $D = $d$+$d$^*$. The dga constructed from this spectral triple (in the sense Branimir explained above) will coincide with $\Omega^{\bullet}$. This spectral triple was first constructed by Dabrowski and Sitarz (or at least the Dolbeault-Dirac version) and later reconstructed by Majid from a more geometric point of view.

This construction can be extended to a much larger class of examples called quantum flag manifolds . . . but this is very much ongoing work.