How does blockchain technology work and how is it applied?