Optimal image sizes for both are:
HERO - 6:1 ration (rectangular)
AVATAR - 1:1 ratio (square)
Both places will contain an icon that looks like a camera. Click this icon and follow the instructions.
This feature does not work on mobile yet, so setting the pictures up you will need a desktop computer.