Best way to ask an user to accept the terms and conditions

I've currently working on a registration page, and after looking across the internet I've seen two different types of way to get an user to agree with the Terms and Conditions.

The first way is to use a checkbox, labelled with "I agree to the Terms and Privacy Policy"

The second way I've seen is some text labelled near the continue button, with the "By clicking "Continue", you agree to the Terms and Privacy Policy" on it. Most technology companies seem to use this option.

Is there any difference between both of them, and if not, which one would be more appealing for the visitors?