The accretion process plays a key role in releasing the gravitational energy of accreting matter in high-energy objects (e.g., active galactic nuclei, AGNs). It is well known that the accretion disk is gravitationally unstable in the outer part of the AGN disk, where many stars may form. Considering these stars stay in a dense environment, they will evolve quickly in a much different way compared to isolated stars. These stars will evolve into compact sources (e.g., white dwarf, neutron star, and stellar-mass black hole), which will themselves accrete matter and continue to evolve. Observations indicate that the metallicity, estimated from broad emission lines of AGNs, ranges from solar to supersolar and does not evolve with redshift up to around 7. This metallicity is also correlated with the mass of the supermassive black hole (SMBH) or the luminosity of the AGN. We discuss the possibility of star formation and evolution in the outer unstable AGN disk and find that it can roughly reproduce the observed correlation between the SMBH mass and metallicity if the stellar mass distribution is 'top-heavy'. The model also predicts that the metal enrichment is very fast, which can explain why there is no strong redshift evolution for the metallicity in AGNs. During the AGN phase, both stars and stellar-mass compact objects interact with the AGN disk. The SMBH at the center of our Galaxy may have been in an active phase millions of years ago. If Sgr A* was active in the past, the accretion disk may have had a significant impact on the dynamics of stars in the Galactic center, where the drag force exerted on stars during star-disk interaction could lead some of them to sink into the accretion disk. These embedded stars will rapidly migrate inward and eventually be disrupted within several thousand years. The presence of an AGN disk could also explain the absence of stars within 1000 AU, the possible bimodal distribution of S-star inclinations, and their high-eccentricity orbits. Tidal disruption events (TDEs) also provide a valuable probe for studying the dynamics of stars in the nuclear environments of galaxies. Considering the potential interactions between stars and AGN disks, the rates of TDEs can significantly differ from those in quiescent galactic nuclei, providing an explanation for the overabundance of TDEs in post-starburst or "green valley" galaxies. Compact stellar-mass objects interact with AGN disks by falling into them, migrating inward, and scattering due to two-body effects, ultimately leading to extreme mass ratio inspirals (EMRIs). We briefly introduce simulations on the evolution of the stellar-mass black hole (sBH)/star distribution function based on the Fokker-Planck equation. Simulations show that sBHs can grow to several tens of solar masses and form heavier sBH binaries, providing insight into the black hole mass distribution observed by current and future ground-based gravitational wave detectors (e.g., LIGO/Virgo, ET, and Cosmic Explorer). The event rate of EMRIs for sBHs surrounding the massive black hole is also greatly increased, leading to a very strong stochastic gravitational wave (GW) background of the EMRIs, which can be tested by future space-borne GW detectors.