How does sun tanning cause increased risk of skin cancer?

What is the mechanism behind it? references required pls,wether from journal or www.