I have read that in order to have stealth capabilities of the F22, it was designed such that it could cruise at supersonic speeds without using afterburners, which increase RCS. How is this possible? what is the technology behind this?
A normal jet engine has subsonic flow throughout. This avoids shock problems such as choking or excessive acoustic noise.
A conventional afterburner accelerates the exhaust flow to supersonic speed, allowing it to push the plane past the speed of sound. It is placed after the turbines in order to avoid those shock problems.
A supercruise engine must deliver supersonic exhaust flow without using an afterburner. Luckily, in a hot gas the speed of sound is much higher than in a cold gas. So as long as the exhaust is not cooled before exit, its high exit velocity stays subsonic within the engine and only "looks" supersonic relative to the outside air.
The problem with this is that you cannot obtain the usual benefits of mixing bypass air with it to increase its mass flow and thermodynamic efficiency, because that would cool it and create a standing shock wave across it, slowing it to subsonic speeds.
The end result is a bit of a design compromise; relatively high mass flow through the core, relatively low bypass ratio, some sacrifice of efficiency.
It's not that unusual, it's called Supercruise
Supercruise is sustained supersonic flight of a supersonic aircraft with a useful cargo, passenger, or weapons load performed efficiently, which typically precludes the use of highly inefficient afterburners or "reheat".
One of the best known examples of an aircraft capable of supercruise was Concorde. Due to its long service as a commercial airliner, Concorde holds the record for the most time spent in supercruise; more than all other aircraft combined
The F-22 is powered by the Pratt & Whitney F119
The requirement for the ATF to supercruise, or fly supersonic without afterburners, results in a very low bypass ratio of 0.3 for the F119-PW-100 in order to achieve high specific thrust.
There's nothing magical about the speed of sound. Sure, there are some shockwaves that form around that speed that increase the air resistance, but getting past those is a (conceptually) simple matter of designing the plane to minimize the shockwaves, and then having enough engine power to overcome what's left.