Arduino Mega 2560 (specialized function of pins)


I am new to this world. I have Arduino Mega 2560. it says about 54 pins that these can be used as input output depending on pinMode(), digitalWrite(), and digitalRead() instructions. There are some pins have specialized functions within 54 I/O pins, for example:
Serial: 0 (RX) and 1 (TX); Serial 1: 19 (RX) and 18 (TX); Serial 2: 17 (RX) and 16 (TX); Serial 3: 15 (RX) and 14 (TX).

My question is if I do not want to use above said pins as serial communication pins, will I have to write any instruction in the program before using these pins to not to use them as serial communication i.e., any instruction like pinMode()? Since the webpage of Arduino Mega 2560 explicitly says about PWM pins which are from 2-13 and 44-46 that use analogWrite() function with them. It is confusing me.

Thanks for read.