Sticky notes are sticky because they have a light adhesive on the back that can attach to most surfaces. The adhesive is strong enough to make the notes stick but not so strong that they leave a residue or damage the surface they are attached to.
Sticky notes were inadvertently invented by Dr. Spencer Silver in 1968. The chemist tried to come up with a super-strong adhesive that did not damage surfaces. Instead, he ended up with a very weak sticky material. Dr. Spencer's new adhesive was shelved until colleague Art Fly decided to use it to bookmark pages in his church choir's hymnal. He discovered the adhesive did not damage the paper and stayed in place until removed. Additionally, he was able to reposition the adhesive bookmarks multiple times and they remained sticky.