Carbon atoms have in their valence shell 4 electrons, therefore in order to have its valence shell complete, following the octet rule of 8 electrons in the valence shell, it will only need +4 to be stable, and that is why carbon atoms will bond with 4 hydrogen atoms, since H has only one electron each, Carbon with 4 Hydrogens, will end up being stable and complete.
In methane's case and also in the vast majority of carbon compounds the type of bonding will be a Covalent bond, in which carbon will be sharing the electron with other atoms, like Hydrogen for example