When you you use (to do) and (to do). as to how do i know when to use it and when not to use to.
and you just give me an explaintion on it.
Otherwise it's difficult to say much more than you use "to go" when you are talking about going somewhere, and you use "to do" when you are talking about doing something.
You're probably confused about their auxiliary functions. In any case, posting some sentences will give us a start.