Diodes can be used in both AC and DC applications, but they primarily allow current to flow in one direction. In DC circuits, diodes act as a one-way valve, permitting current to pass only in the forward direction. In AC circuits, diodes can be used to rectify the alternating current, converting it into direct current. This is how they function in power supplies, for example. So, while they can handle AC, their fundamental role is to control current direction, which is typically associated with DC.