Questions & Answers about Я подошёл к окну и увидел, что на улице идёт град.
Подошёл is past tense, masculine, perfective: it presents the action as completed—I came up (and arrived) at the window.
Подходил (imperfective) would usually mean something like I was walking up / I used to come up, focusing on the process or repetition, not the completed arrival. In this sentence, the completed arrival naturally sets up the next completed event (увидел).
к means toward / up to and requires the dative case.
окно → dative singular окну. So подойти к окну = to come up to the window (motion toward a destination).