Generally photons are EM waves (2-axis i.e, 2 dimensions); from that we can imagine a photon basically travels in a cyclic wave pattern. If we go into higher dimensions, will they trace a spiral path to travel? Do they have a specific shape? I don't have an idea what photons are actually comprised of.
Photons are elementary particles, as per the Standard Model, they are point like and do not have any substructure or spatial extent. You are asking what photons comprise of, but as they are elementary, they are not comprised of anything simpler.
As photons are QM objects, the very quanta of light, they do not have specific trajectories as they travel, they are delocalized. When the photon interacts (is absorbed for example), only then is it localized.
When we look at light in the quantum regime then the whole concept of a trajectory is meaningless because the trajectory is a classical limit. At quantum scales no particle, including light, has a perfectly defined trajectory.
Now the connection between the classical EM waves and photons is a beautiful example how this classical EM wave emerges from the herd of photons, individually being QM objects.
the classical electromagnetic field emerges from a large confluence of photons. It needs the mathematics of quantum field theory. The electric and magnetic fields are present in the photon wave function, which is a complex number function and is not measurable, except its complex conjugate squared, a real number gives the probability density of finding the photon in (x,y,z,t). It is the superposition of the innumerable photons wave functions which builds up the classical EM wave.
You are asking about the shape of classical EM waves, and it can be very confusing because you see these images of oscillating wave forms displayed as EM waves. In reality what oscillates is the E and M field values.
In light propagation, oscillation does not mean any movement in space. It is the value of the electromagnetic field, at one given point in space, that oscillates. For electromagnetic waves, there is no matter or photons that go up and down. Instead, you have to imagine that there is a little arrow associated to each point in space: this little arrow is the electric field direction. Another arrow, at the same point, is the magnetic field. These two arrows change size and direction with time, and in fact they oscillate.
When you are asking about the cyclic wave pattern, maybe you think of the polarization of the EM wave, which can have different types mainly linear and circular.
An electromagnetic wave such as light consists of a coupled oscillating electric field and magnetic field which are always perpendicular; by convention, the "polarization" of electromagnetic waves refers to the direction of the electric field. In linear polarization, the fields oscillate in a single direction. In circular or elliptical polarization, the fields rotate at a constant rate in a plane as the wave travels.