This is a superb question that really gets scientists thinking. We can approach this fundamental question in so many ways but we will be scientists today and look at it in a scientific manner.
Why are the scientists thinking so much about this question? It is because we don't know the whole answer yet and is an intense area of research which is giving us some answers but also plenty more questions.
What we do know (or think that we know based on experiments and observation made to date) is that they can made in places of extraordinarily high temperatures, pressures, speeds and energy. These places can be in the heart of stars, galactic explosions, nuclear explosions of hydrogen bombs and powerful particle accelerators.
Scientists currently understand that the main place of atoms were made was the big bang about 14 billion years ago by processes that are still various theories that are being proved or disproved by ongoing experiments. One of the most famous experiments currently being done is the Large Hadron Collider (LHC).
We live in interesting times while many scientists in many nations work to answer your excellent question.
Maybe we will all have your answer very soon.