What is the difference between primary and secondary markets?

Can you explain what is the difference between primary and secondary markets? in detail?