Can you explain the difference between these two sentences?
I cannot go to school.
I can not go to school.
I cannot go to school
I can not go to school
In British English, the accept negative form of 'can' is cannot (one word). I cannot (often contracted to I can't especially in speech) go to school almost certainly means I am unable to got to school / It is not possible for me to go to school. It could also mean I may not (= am not allowed to) go to school, though this would need to be made clear by the context.
The 'ability/possibility' meaning is shown in:
I cannot (can't) go to school) because we are snowed in.
The 'permission' meaning is shown in:
My father says I cannot (can't) go to school. He says that education is only for boys.
I can not go to school is more problematic. It could be that the person who wrote this has simply not written the two words as one. This is a very common 'mistake', because 'not' is not written together with the verb that precedes it with any other verb. Indeed, some people would not consider this to be a mistake. Note that we cannot tell in speech the difference between 'can not' and 'cannot'. Both forms can be contracted to 'can't'.
A second, less common, possibility for 'can not' is that it means 'have the ability not to'. In this sense, the two words are always written separately. In speech,, there is a slight but discernible pause between them, and the 'not' is stressed. An example of this is:
A: You have to go to school tomorrow. You can't not go.
B: I can not go. Nobody can make me.
Note that, as we see from A's words, this form can have a 'double negative; You can't not go (It is not possible/permissible for you not to go) does not mean the same as You can go.
They are interchangeable, although "cannot" is the more common and preferred spelling. "Can not" can be used for emphasis as in:
No, I can not go to school.
or when it is followed by another construction:
I can not only walk, I can also run.