How to use arduino control an ESC and flash?
ESCs are designed to work with radio control receivers that have servo outputs, so they expect to see a servo pulse signal (typically a 1~2ms pulse repeated 50 times per second). This signal can be produced with an Arduino using the Servo library.

The standard firmware in most ESCs is optimized for running a model aircraft motor, and usually has a fairly slow throttle response to help the motor run smoother. 'Flashing' an ESC refers to replacing the firmware with one optimized for drones, which need the fastest possible throttle response for best stability. You can now buy ESCs which already have this firmware in them, which saves having to do it yourself.