Aspects of cosmology and black hole physics in string theory