How to connect containers in docker engine?

I have created two docker containers (Backend container and frontend container) in docker engine. Is there a way to connect these two containers to communicate with each other?