PVC pipe like that is relatively easy to repair. The general concept is that you cut out the bad section including any fittings and then install new pipe and the necessary fittings to join back to the part where you cut it out.
If these lines carry water under pressure then you will need to make sure to shut off the water supply and ensure that the area where you cement in new PVC fittings is completely dry. Wet pipes and fittings do not join correctly.
I have to comment that I question this strange slopped on yellow looking cement for the existing PVC joints. I have never seen that before and it makes me wonder if the original installer used the completely wrong type of cement for the fittings. By honest evaluation it looks a lot like contact cement which would have been less than marginally effective at joining PVC fittings that would be under pressure. I would investigate to determine if this yellow stuff is legitimate. If it is not you may want to consider replacing more than just the currently leaking part.
When repairing make sure to use the correct type of PVC materials for pressurized water service. There are various grades of PVC pipes and some are called CPVC.