For this, you have to understand the design of periodic table.
The elements in the table are filled by the configuration of their shells.
Hydrogen has 1 electron - 1s1 configuration (1 electron in s shell) .
Helium has 2 electron- 1s2 configuration
This makes Helium fully filled and have noble gas configuration - so it is placed amoung other elements with fully filled shells.,
while Hydrogen is placed amoung elements with 1 e in their respective s shells.