PWM has a frequency but it's dc ???

We say dc has a frequency of 0 but PWM, I2C, SPI, USART and ADC has a DC frequency. For example if I write analogWrite(pwm_pin,122) it will approximately 2.5 volts "DC" right? Is that means DC has a frequency?

Yes. Any signal can have a frequency. A signal can be either AC or DC.
No. We don't say that DC has a frequency 0. A steady DC signal has a frequency 0 but a DC signal does not have to be steady.

In DC, the current can only go one way. In AC it can go both ways. In either case, the current can change regularly and so it can have a frequency. Those changes can carry information / data. The data can be as simple as "the toilet is occupied/not occupied" or as complex as a 4K HDR video with 7.1 channel suround sound.

Thanks for the great answer.

There are two concepts that may be helpful here. One deals with when an AC signal is overlayed on a DC signal as happens in a fixed wire telephone line. There is a "battery" voltage applied to the line (to power the telephone) and then the voice signal (AC) modulates the DC voltage, causing it to vary around the battery voltage. The current moves in one direction only, but it increases and decreases in that direction at frequencies determined by the voice signal. The telephone components then "extract" the voice part of the signal and deliver it to the receiver to be heard. The DC current "carries" the AC (voice) current and varies at voice frequency.

In PWM, we are dealing with a different (although related) scenario. The signal in that case is DC that is switched on and off at a certain frequency. When "on", the voltage rises to the supply voltage, when "off" the voltage drops to ground (for example). Thus the DC voltage is being switched on and off at the PWM frequency, say 1kHz. To a measuring device (oscilloscope), it looks like (square wave) AC of that frequency going from 0 to 5 volts and back again. Notice that this frequency is not what is carrying the signal information though. The signal information is being carried by the relative duration of the on and off signals. For a more complete discussion of how the signal information is transmitted, it is necessary to consider power, rather than voltage or current independently. That's interesting, but beyond a quick response.