You're not crazy. I do such things all the time, mostly to revise things I've already learned and to check my own understanding of things. I have "imaginary" conversations with myself in order to pose questions to myself, to check whether or not I've fully thought things through. It's a useful tactic.
As long as you know it is yourself, you're not suffering from delusions, which means that you're probably not mentally ill. There are many mental illnesses, but the ones you are concerned about (the psychotic illness), require you to believe that the voices are coming from outside your head. Really mentally ill people will hear voices as clearly as if someone else in the room is talking to them - the voices will not go away and are often derogatory, controlling or threatening. Sometimes they hear two or more voices talking about the patient, often criticizing their choices and lifestyles.
As long as you know that you are talking to yourself, and as long as you don't ACTUALLY hear voices, then I think you're fine.