How do you get skin cancer? It's not an easy question to answer, there are multiple factors in place. The number one though, by far is sun exposure. It's not just an exposure in the past year or two, but sun exposure that started very early in life and that extends into teen-age years. A sunburn in particular is a very important risk factor.
Recently, people have shown that using tanning booths is a separate risk factor other than prior skin exposure. The second to think about is family history. Do you have a mother or a father with skin cancer? What type is it? Was it related to melanoma or non-melanoma? These can all factor into whether you should be screened for skin cancer, or how frequently you should be screened for skin cancer.