Secular and sacred music

How did secular and sacred music differ in the Middle Ages?

What do the terms sacred and secular mean?

How could you tell which music is sacred and secular?
Do you see any connections between sacred and secular and the music of today?