A stake pool is used to delegate your voting powers to a third party (the pool). The pool cannot steal your funds.
Participating in a stake pool is perfect for people who wish to take part in HC's proof of stake voting but can't due to:
The source code is available at GitHub.