How does one implement an interface in erlang? What is the structure of the modules or how is it setup?
I have a layered architecture and want to implement the interfaces in each layer. Allowing the layer which requires the below layer to handle some task to access or call for these tasks.
How would this interface module look in terms of functionality?
An interface in the sense of a Java interface or an ML module signature does not exist in the dynamically typed Erlang world. You will have to document the behavior in a comment or provide a -spec contract for the dialyzer to look at.
In general, the best way to approach a language is by not presuming you can map your existing knowledge too much into it, unless you happen to know a language that is "close" in concepts. Languages close to Erlang are Prolog and Scheme. Farther out comes Python and Ruby, but their reliance on an OOP design puts them into the horizon. Anything statically typed, Ocaml, Haskell, Java, C#, C++ and so on are definitely beyond the horizon.
The closest concept in Erlang is user-defined behaviour. However, they tend to be used quite rarely. Note that the only thing which is checked is existence and arity of functions. You can't test that the module actually implements some behaviour; you just call the callback functions and if the module happens to "accidentally" export functions with same names, you are out of luck.