Before you run through a red light because it's been five minutes and come on already, there may be a few ways you can get the light to turn green. This video breaks down how to do it.
Depending on the technology used at the intersection you're waiting at, the light may be on a timer (in which case there's nothing you can do), or it could use a variety of sensors. Some use cameras which detect motion. If you spot a little black camera on a pole overlooking the intersection, rolling your car just a little bit can help the camera see that you're waiting.
For example, in Australia, the Sydney Coordinated Adaptive Traffic System (SCATS) is used, which manages the timing of signal phases via sensors at each traffic signal to detect vehicle presence.
Induction loops in the ground are also common. You can see these buried in thin grooves in the shape of a rectangle at the front of an intersection. These detect the metal in your car using magnetic fields. Ideally you should be in the center of these sensors to effectively trigger them. If you're on a smaller vehicle such as a motorcycle, you can try lowering the kickstand as a last ditch effort to get a little more metal closer to the loop, or try putting a magnet on the bottom of your bike.