How does using the following code transmit the data to Android app using?

void setup()
{
Serial.begin(9600);
}
void loop()
{
char c;
if(Serial.available())
{
c = Serial.read();
Serial.print(c);
}
}

I was searching for a lot of tutorials on how to send the serial data from arduino to an Android device using bluetooth. Most of them had this kind of code. How is Serial.print sending the data over bluetooth? Or is it the default behaviour?

The way this would work is if you have an Arduino board (e.g., Uno, Mega, Nano) that exposes the Serial port on pins 0 and 1 and you had a Bluetooth module running in serial communication mode connected to those pins.

This is not necessarily the ideal system because those pins are also used to communicate with your computer over the USB cable, such as printing to Serial Monitor and Uploading sketches to the board. You may find that you are unable to upload to your Arduino board while the Bluetooth module is connected to pins 0 and 1. You will also not be able to effectively use Serial for printing debug output to Serial Monitor because that will interfere with the communications over Bluetooth.

If you are using an Arduino board that provides multiple hardware serial ports (e.g., Mega, Leonardo, Micro, MKR boards), then you can connect the Bluetooth module to those pins and use that hardware serial interface. Note that in the case of the Leonardo, Micro, and MKR boards, pins 0 and 1 are Serial1, so you can still use pins 0 and 1, but you need to adjust your code to use Serial1 to communicate via the Bluetooth module:
https://www.arduino.cc/reference/en/language/functions/communication/serial/

If you are using a board that only has one hardware serial port (e.g., Uno, Nano, Pro Mini), a better option is to use the SoftwareSerial library to create a serial port on pins other than 0 and 1, and connect the Bluetooth module to those pins:
https://www.arduino.cc/en/Reference/SoftwareSerial