The process by which molecules or other entities arrange themselves into an ordered structure without external guidance.