A capacitor consists of 2 conductive plates separated by a non conductive dielectric material. There is no path for DC currents, it is an open circuit as far as DC is concerned. AC is able to pass because electric charge is stored on the plates, energy can be exchanged through the changing E&M fields that exist between the plates.
An Inductor is merely a piece of wire so it is seen by DC as simply that, a wire. To AC on the other hand the continually changing E&M fields attempt to maintain a constant current, thus it resists the AC changes, imposing an impedance that depends on the frequency of the AC current.
A Capacitor also presents an impedance to AC which depends on the frequency.