One of our favorite things to do in the summertime is to bring a caterpillar into the house to observe. We used to make butterfly houses out of tulle, but now, we just let them free within the house. The larva is happy to stay where the food is!
When it's ready, it simply crawls around a little bit until it finds a suitable place to attach and begin forming the chrysallis.
When the butterfly emerges, it needs some time to dry its wings, which is usually long enough for us to find it for release.