The technical rule used for inversion in German is that the verb always comes in the second position (as the second word in a sentence). For example, in the sentence 'Ich sehe das Haus' (I see the house) 'Ich' (the subject) is in the first position so 'sehe' (the verb) comes afterwards in the second position, in this case the German word order is the same as the word order in English. However, when another word starts the sentence, it takes the first position, and the verb stays in the second position. For example, in the sentence 'heute sehe ich das Haus' (I am seeing the house today) the time expression word 'heute' (today) is taking up the first position. To keep the verb in the second position, we need to switch around (invert) the subject and the verb, this is called inversion. So in this sentence the word 'Ich' comes after 'sehe' because 'sehe' needs to be kept in the second position.
An easy rule of thumb to remember is if you are starting a sentence with a subject, which in this case is 'ich' you can keep the same word order as in English, this is our first example 'Ich sehe das Haus', if you start the sentence with another word, or the sentence comes after a comma, you need to invert the subject and the verb to keep the verb in the second position, this why in the sentence 'Heute sehe ich das Haus' the subject and the verb seem to be switched around for a native English speaker