Why do we have a upper and lower bound to the main sequence in the HR diagram? The main sequence in the HR diagram doesn't run from infinity. So why do we have an upper bound and a lower bound? I mean mass is the defining parameter in the main sequence and higher up the sequence means more massive stars. Is it related to temperature of the stars?
 A: The heavier the star is the higher the pressure is on the core. To keep in equilibrium the core needs to push back equally by being very hot. The hotter it is the more fusion can occur. Normally, were the star to collapse a bit it heats up, the pressure increases and it expands outward; were it to expand a bit the fusion rate decreases, temperature goes down, and it shrinks. But this only works if the luminosity and mass can balance each other. 
The upper bound is set by the Eddington luminosity. This is the star luminosity that is so high that the light pressure blows away the star's mass until the lower mass reduces the temperature, fusion rate and hence luminosity. 
The Eddington limit for stars can be estimated to $$L_{\text{Edd}}=4\pi c G \frac{M}{\kappa}$$ where $\kappa$ is the opacity factor of the star. This luminosity is about $3.8\times 10^4 (M/M_\odot)$. Since luminosity increases roughly as $L\propto M^3$ this gives a maximum stellar mass of 200 solar masses with a luminosity of $7.4\times 10^6$ times the sun.
In practice the largest stars are somewhat smaller than this since $\kappa$ changes with temperature (and "metal" content - early stars may have had so low metallicities that they were 300 solar masses or larger). 
The lower end of the main sequence is set by the minimal mass able to heat the core to fuse hydrogen, about $0.075M_\odot$. Brown dwarfs are smaller and may have some temporary deuterium fusion, but they never reach the main sequence. They hence shrink until they are held up by the degeneracy pressure instead of high core temperatures, reaching about Jupiter-size.
