How can a photon be a wave and a particle at the same time?
because it's "like" a wave, not a wave
It's a quantum object. The experiments of the early 20th century forced physicists to abandon the classical notion of particle as a solid object, instead particles all behave like waves but in a probabilistic sense. The particle is no longer localized, it is everywhere. Everything is quantum, fields are, and the photon is nothing but the unit of EM field energy..
Please read if you can, there is no short answer to your question, including mine. Books like QED can help. Keep asking :)