You first need to initialize the Serial with Serial.begin(9600) in the setup() function, where the number is the baud rate and must be match in the Serial monitor. then after the Serial is initialized you can use Serial.println("hello"); either in the setup or in the loop or any other function