Wherever possible, bounce the flash off a wall or ceiling. Off-camera is the best option with some kind of softbox or umbrella but that may not be practical. If all else fails then a diffuser for on-camera flash can help - larger the better although they obviously become more cumbersome. Popular choices are Lightspheres, Ezybox Speedlite or Flashbender.