They both mean "so, then". So, there really isn't a big difference. However, "ainsi" is also used to mean "this way" or "in this manner"
Example: C'est ainsi... c'est la vie-- It's the way it is, it's life.
I would say that "ainsi" is more of a consquence of something, while "alors" is more of a "so I guess". But still, "alors" is used more in casual talk. So, you'll see "alors" more. Hope that helps ;)