In the context of AWS:
AMI is used to package software and can be deployed on EC2. Docker can also be used to package software and can also be deployed to EC2.
What's the difference between both and how do I choose between them?
An AMI is an image. This is a whole machine that you can start new instances from. A docker container is more lightweight and portable. A docker container should be transportable between providers while an AMI is not (easily).
AMI's are VM images basically. Docker containers are packaged mini-images that run on some VM in an isolated environment.