- Dockerfiles define the components and configuration of Docker images and allow them to be built automatically. - The FROM instruction sets the base image, RUN executes commands during the build, and EXPOSE defines exposed ports. - Common best practices when writing Dockerfiles include adding metadata like MAINTAINER, using comments, and defining an ENTRYPOINT to configure what runs when containers start.