What is the difference between min SDK version/target SDK version vs. compile SDK version?

What is the difference between min SDK version/target SDK version vs. compile SDK version?

What is the difference between compileSdkVersion and targetSdkVersion?

What is the difference between compileSdkVersion and targetSdkVersion?