Is a photon really massless? If a photon travels at a speed of light and its massless then it must have no energy but this is not the case as we see in photo electric effect. Also help me to know what are photons made of, how are they created?.
 A: When people claim that a photon is massless, they mean that a photon has zero rest mass. In special relativity, the formula for the energy of a particle with mass $m$ possessing a momentum $p$ is 
$$ E = \sqrt{p^2c^2 + m^2c^4}$$
If we set $m = 0$ for a photon, we'll end up with
$$E =  pc$$
Here the momentum of a photon is described by quantum mechanics to be
$$p = \frac{h}{\lambda} $$
with $\lambda$ being the wavelength of light.
So it can have an energy, while still being massless.
A: 
If a photon [is] massless then it must have no energy

This is not the case. One way to think of mass is as nothing more than a convenient name for rest energy. Photons are indeed massless and thus have zero rest energy. This is not an issue because according to special relativity, they do not come with a rest frame.
Please note that assuming we denote rest mass by $m$, the well-known $E=mc^2$ is not the whole story - the general formula reads
$$
E^2 = m^2c^4 + p^2c^2
$$
In principle, you could think of three types of particles, depending on the relative values of energy and momentum:


*

*$E^2 > p^2$: massive particles, $v < c$

*$E^2 = p^2$: massless particles (eg photons), $v = c$

*$E^2 < p^2$: tachyonic 'particles', $v > c$


The last variant is hypothetical and not really particle-like (they cannot be properly localized and would manifest more like an action-at-a-distance).

what are photons made of

As far as we know, they are elementary particles. They are excitations of a bosonic quantum field and not made out of anything.

how are they created

Through processes that involve the electromagnetic interaction in general and accelerating, vibrating or jumping electrons in particular.
A: No, a photon does not need to have mass to be able to interact with matter. In fact it is its energy which is important in interactions. For the photoelectric effect the incoming photon must contain enough energy to displace the electrons on the metal of the photodiode.
The question of what are photons made of is a pretty deep and difficult question, one that can only be answered with particle physics. But this is what I do know. You can create photons from pair annihilations (electron+positron, etc). And you can cause a photon to be ejected if you let an excited electron go down an energy level in an atom/molecule.
