I'm having trouble understanding the difference between 何かあるのですか。and 何かあったのですか。Are they both the same? Initially I thought that the former was present tense and the latter was past tense but I really don't know. It's confusing to me. Please explain...
あった is the past form of ある, so the difference is simple:
Is there something?
Is something going on?
Will something happen?
(Very literally: Is it that something exists?)
Was there something?
Did something happen?
(Very literally: Is it that something existed?)
のですか/んですか/のか/の at the end of a question is for seeking clarification (known as explanatory-no). See this article and this question. のだ/のです/etc itself won't be in the past form even when you're talking about something in the past.