ШТО и ШТА depend of the context of the sentence. ШТО is a short version of ЗАШТО. ШТА can be a question for the subject, but also can be a question, but not a subject.
Example: Шта радиш? Шта гледаш? Шта читаш? ...
You're example Што је то? is Croatian and Шта је то? is in Serbian.
Sentences are the same, but in different languages.