1. How do I make my own binary operators?
You can do this by wrapping your operator name (made entirely of symbols) in parenthesis and giving it a definition. In the case you mentioned, if you have the data constructor:
data List a = Cons a (List a) | Nil
then you can define:
(:) :: a -> List a -> List a
(:) = Cons
As for where it's implemented, it's in the standard prelude:
data [a] = [] | a : [a] deriving (Eq, Ord)
-- Not legal Haskell; for illustration only
(that comment is there as well) -- I think the actual implementation of lists is hidden by the compiler (because the brackets are syntactic sugar), but it's included in the Prelude.
2. How do I define custom syntax?
The Hamlet syntax is an example of a QuasiQuoter, which is implemented using Template Haskell, which is a set of faculties for meta-programming Haskell. Custom syntax like this is not, in general, very easy to define.
data Stream a = a :> Stream a
. – luqui Jul 2 '14 at 23:55