You had a wonderful day at the beach. You built a sand castle, played volleyball and finally figured out how to stand up on a surfboard. Now you're getting ready for a good night's rest. But there's a problem -- your skin is so sore that you can't find a comfortable position to lie down in. It's also bright red, and it feels hot to the touch.

You have a bad sunburn.

People need to absorb sunlight for good health. It helps the body grow strong bones. But there are times when you can get too much of a good thing -- like after a long day on the beach without sunscreen or protective clothing.

Sunlight contains invisible rays called ultraviolet light. These are the rays that burn your skin. If you've ever gotten too much sun, you know that it really hurts. You may feel feverish and sick. And even after you feel better, you usually have to put up with having the top layer of your skin peel off. That may be fine if you're a snake -- but it's not much fun for a human being.

When you get a sunburn, the blood vessels near your skin swell up. This is your body's way of bringing extra blood to the surface to help you heal. But in the meantime, you look red and feel pretty uncomfortable.

But getting sunburned can have even more serious consequences than that. Doctors have found that years of exposure to too much ultraviolet light makes the skin dry out and lose its ability to stretch. Someone who gets too much sun early in life can end up with skin that looks wrinkled and saggy long before he or she is old.

Skin cancer, a very serious disease, also can be caused by too much sun. Scientific studies show that people in the United States are getting more skin cancer now than they used to. Many scientists believe that's because so many Americans spend the summer soaking up sun.

Your body has a built-in defense system against the sun's harmful ultraviolet rays. It's called melanin, and it's the substance that makes your skin the color it is. All human beings -- whether they are white, black, yellow, red or brown -- have melanin in their skin. Melanin is produced by special cells called melanocytes. If you are dark-skinned, your melanocytes make a lot of melanin. If you are light-skinned, they don't make as much.

When people go out in the sun, their melanocytes start working overtime. The cells start producing more melanin than usual. The melanin protects the skin, because it soaks up harmful ultraviolet rays before they can get through the skin and damage delicate tissues. This process happens whether you are light-skinned or dark-skinned; it just happens in varying amounts.

Some people's cells produce melanin in uneven patches of color. The result? Freckles.

Dermatologists -- doctors who take care of the skin -- recommend that people use protection when they go out in the hot summer sun. There are three basic rules:

* Avoid the sun during between 10 in the morning and 2 in the afternoon. That's when the ultraviolet rays are at their strongest.

* Wear a hat to protect your head and face when you do go out in strong sun.

* Use a sunscreen to protect your skin from harmful ultraviolet rays.

If you follow these simple rules, you'll be taking good care of your skin for future use. Tips for Parents

"It's never too early to start taking care of your skin, and thinking in the long term," says Karen Fisher, director of Somebodies Body & Skin, part of a Georgetown exercise studio. "Don't think of it as a chore; think of it as something special you're doing for an important part of yourself."

She says parents should be aware of the sun's harmful potential. Before your kids go outside, have them apply sunscreen on all their exposed skin. Don't forget the tops of the feet, the ears or parts in the hair. (A sunburned scalp can be very painful.)

Products containing PABA -- para-aminobenzoic acid -- are also effective. Put the lotion on about an hour before going outdoors. The PABA will absorb ultraviolet rays. Or use a lotion with a fairly high sun protection factor (SPF). The number on the product indicates how many hours your child can stay in the sun and receive an exposure equivalent to one hour without the sunscreen. Always reapply sunscreen after your kids go swimming -- and don't assume that you can skip the lotion on a cloudy day. Ultraviolet rays can penetrate cloud cover.