Hi Tyler: The first thing to do is relax,...because nothing is really wrong.
You just need some information and then some solutions.
The genital skin is composed of both skin and Dartos muscle (google it).
The Dartos Muscle runs through the skin from tip of the natural foreskin, down the shaft, through the scrotum and to points beyond.
It is the expansion and contraction of this Dartos Muscle that causes the penile and scrotal skin to "writhe" as your watch it.
A component of the Dartos Muscle is the Frenar Band (google that one too) which is a ring of muscle that closes down the skin opening.
This ring of muscle responds the same way as the muscle in your arm of you over stretch it or work it too hard. It swells up and gets a little sore. This always goes away in a few days so just be patient. This accounts for the swelling and puffiness in the foreskin.
I have loads more information on that if you want it.
An aggressive masturbation session can over stretch the Frenar Band when it is not quite loose enough to expand over the whole glans. This over stretch can cause the swelling you describe.
The best thing for the moment is to go easy on that little guy, and not try to force it back when it is not quite ready to retract fully.
At 13, not many guys can fully and painlessly retract their foreskin. Some can, but the normal for this in mid teens,...so give yourself some time. Adopt a masturbation method that does not over stretch the skin opening while you practice the stretches I have attached,...after the swelling is gone.
There is nothing wrong with you that some simple foreskin stretches cannot solve.
You have a naturally tight foreskin, just like every other intact (not circumcised) man on the planet had at your age.
Over 85% of the males on earth are intact so you are on the winning side. The other 15% are envious and wish they still were intact.
Follow the information in the links below and work the foreskin stretches into the daily shower routine.
Let the warm water loosen and relax the skin before stretching.
Stretches are to be firm, but gentle, with no pain. Pain is a damage indicator. Over stretching till it hurts can create micro tears in the skin opening that will heal over with non elastic scar tissue, making retraction more difficult. No pain,...ever.
What will happen is the Frenar Band (google it) of muscle that closes down the skin opening will relax and expand enough to allow the foreskin to glide effortlessly back and forth over the coronal rim of the glans.
You should see some good results in two weeks, with full and painless retraction in 3-4 months. If it takes longer just keep stretching.
Do not listen to anyone who claims you need to force the skin back to clean under there. Nature has this well in hand. The foreskin/glans combination produce a powerful anti microbial compound called Langerin. Langerin wards off bacteria and keeps this area clean and disease free.....just like you are now.
Go to: www.norm.org and read about the reason and function of the foreskin. You will see how very fortunate you are to still have yours, and how misguided are those who promote circumcision for any reason.
Good luck and I hope this helped.