Type Ia Supernovae and their implications for cosmology