You can drill holes in the rocks and attach them using wooden dowels. You can also drill holes and connect them with a PVC frame or zip ties. But most rocks will be pretty stable just stacked together. It's like a puzzle -- you just have to figure out the right combination. A more permanent solution is epoxy putty to stick them together, but we've all had to remove our rocks at one time or another, so I would advise against permanently sticking your rocks together.