I will try to address 2 points here:
1) Light does not necessarily move by rectilinear (straight line) propagation. diffraction is one example. If you also consider general-relativity, then due to the curvature of space-time between 2 massive bodies, light will have to follow a curved path, known as a geodesic in transit.
2) The light from a star is not 1 beam wide, in fact, it has complete angular distribution from a celestial horizon to another. If you can't see a star at night, it may be due to its excessive dimness or due to it being beyond the horizon (notwithstanding atmospheric conditions). This very large angular distribution of its radiations allows you to see a star (don't forget that a star is in fact a sphere, not a point source of light).