Dynamic proxy: Dynamic implementations of interfaces at runtime using JDK Reflection API.
Example: Spring uses dynamic proxies for transactions as follows:

The generated proxy comes on top of bean. It adds transnational behavior to the bean. Here the proxy generates dynamically at runtime using JDK Reflection API.
When an application is stopped, the proxy will be destroyed and we will only have interface and bean on the file system.
In the above example we have interface. But in most of implementation of interface is not best. So bean does not implement an interface, in that case we uses inheritance:

In order to generate such proxies, Spring uses a third party library called CGLib.
CGLib (Code Generation Library) is built on top of ASM, this is mainly used the generate proxy extending bean and adds bean behavior in the proxy methods.
Examples for JDK Dynamic proxy and CGLib
Spring ref