The difference is simply that "I am" is present tense and "I was" is past tense.
However, in ordinary conversation you would often use "was" even though "am" would be logically correct: for example "I was wondering if it will rain today and if I should go for a walk."