If you want to know how an op-amp can amplify both ac and dc signal, you need to learn how a transistor does the same. The transistor has a low input and output impedance. When it's loaded, the gain decreases.
Let's Get It Fixed!
HomeX virtual experts will assess your issue (for free!) and can resolve simple problems.