However the main idea is to try and address two issues that are common among badly designed systems, namely; Code Scattering and Code Tangling.
Code scattering is often referred to as "spaghetti code", where you see the same code repeated many times in order to achieve the same results. For example when a class method has had many lines of code added to log the initial state and arguments, and then the final state. This can be solved with AOP, which can be setup with SpringAOP which would implement the logging functionality behind the scenes.
Code tangling refers to the scenario where we have a specific piece of code performs unrelated multiple objectives, often after a period of maintenance programming when a bug fix is implemented badly. This is associated with the concept of code cohesion, where we want the code to only do one thing.
From a Java Spring perspective you can use Springs own implementation (SpringAOP) or use Spring to configure AspectJ. AspectJ offers more features and could be used without Spring.
AOP has its own terms [which I think are a bit confusing], and how this is actually done requires a bit a in depth knowledge of spring internals and since you asked for an introduction I'll leave you to research this. SpringAOP Docs
Before, after, and during a method. AspectJ may offer different options (advise), but cannot comment as I don't know it that well.
Types of [SpringAOP] advice:
Before advice: Advice that executes before a join point, but which does not have the ability to prevent execution flow proceeding to the join point (unless it throws an exception).
After returning advice: Advice to be executed after a join point completes normally: for example, if a method returns without throwing an exception.
After throwing advice: Advice to be executed if a method exits by throwing an exception.
After (finally) advice: Advice to be executed regardless of the means by which a join point exits (normal or exceptional return).
Around advice: Advice that surrounds a join point such as a method invocation. This is the most powerful kind of advice. Around advice can perform custom behavior before and after the method invocation. It is also responsible for choosing whether to proceed to the join point or to shortcut the advised method execution by returning its own return value or throwing an exception.