Arduino needs to be set up to communicate with your Arduino MEGA board. Do this by selecting the model of Arduino board that you have.
You will also need to select the active com port of that board, as it appears in the device manager (assuming Windows OS).
Once the Arduino development environment is configured to communicate with your board, you can open up your firmware of choice (Sprinter is a good place to start).
The important file in the firmware is the Configure.h file. There is where you need to input things like whether or not you are using a heated build platform, the type of thermistors you have on the hot end (and build platform), whether or not you are using hardware/software endstops, etc.
Once you have everything the way you think it should be, you can upload the firmware to the board. If all goes well, the Arduino application will indicate that the upload is complete. Otherwise, you will see error messages. If you do get an error, it is most likely due to selecting the wrong board, or com port in the Arduino IDE configuration, and NOT the board itself.