I can't connect to iCloud. What do I do?

I have an iPhone 6s that's running the latest iOS version (10.3.3), and it won't let me connect to iCloud. Every time I try to sign in, it gives me a "Could not sign in. There was a problem connecting to the server." error. How do I fix this?