:: is a method, known as cons, which takes two arguments. The first argument is the head and is a single element. The second argument is a tail which is another List. nil is used to represent an empty List and is always used when constructing a List with ::.
This represents a List whose first element is x and the rest of the elements are the elements of another List xs. Hence, the fruitList in the code above could have also been defined as follows:
When using this method in code, we can actually remove the parenthesis ().