Inversions are chords where you play the right notes, but not necessarily in the right order!
For example, we said that a Major Chord is made up from the Root, 3rd and 5th in that order so the Root is the lowest note.
Now suppose you played the same three notes, but started on the 3rd and played 3rd, 5th and then Root. It doesn't sound quite the same, but its still a Major Chord. This is called the First Inversion.The notes should be ascending, so playing this inversion means finding a Root note above the 5th and not just adding it below as the last thing you do. This would give just the ordinary chord again!
If you do it again and start on the 5th then play the other two notes (ascending) you are playing the Second Inversion. Note that the order of the other two notes doesn't matter - it's the starting note that's important. If a chord has 4 notes, like Seventh Chords do, you can have three inversions. And the trend continues - 5 notes, 4 inversions etc. Any chord can be inverted (majors, minors, sevenths, augmenteds, sixths, diminisheds......)
|D major||D F# A||or D A F#|
|D major (1st inversion)||F# A D||or F# D A|
|D major (2nd inversion)||A D F#||or A F# D|