Yes, Dragons can have up to 4 elements, but only the primary element - appearing first in the list - indicates the dragons weaknesses. Each element represents a move type that that dragon can learn. A dragon with 4 elements is ideal as it can learn 4 different element type moves.
Primary elements are the first element a dragon has listed
The first element of a dragon indictes which moves it will be weak to
The other elements a dragon has indicates the types of moves it can learn!
Some elements are designed to not mix.
These are called opposite elements
A good example would be Fire an Ice do not breed together.
Some elements have an opposite element which means single element dragons of these types cannot be bred directly. but you can use multi-element dragons to attempt breeding combinations of these elements.
When playing some dragon city events, or even opening your daily calendar. you will eventually receive some Element Tokens which are used to upgrade your habitats past level 2.
The game actually provides you with a good battle chart
The battle chart indicates which elements do double damage, and which ones are not very effective
This is visibile when you click the "Question Mark" icon during battle
But here is a copy of that chart!
See the next events happening in Dragon City!