1. You need to have the Arduino IDE installed.
Link - https://www.arduino.cc/en/software
2. Run application.
3. Go to Arduino (or File on Windows system) → Preferences
4. Check settings window, add links into input field
Code for paste:
https://dl.espressif.com/dl/package_esp32_index.json, http://arduino.esp8266.com/stable/package_esp8266com_index.json