What versions of a paper do I still hold rights to? I just had my first paper accepted for publication (hooray!), but I'm wondering how copyright works for the paper. I know that for this publication, the publishing house owns the copyright of the final version, but I'm wondering if that means that I still have rights to distribute earlier versions (e.g., on academia.edu).

If so, which version? I.e., how different does it have to be from the final version?
After accepting the article, the journal will ask you to sign a copyright transfer.  This document should describe in detail what rights the publisher gets, and what rights you retain.  If it isn't acceptable to you, you can try to negotiate; your institution may have an intellectual property office that could help. If all else fails, you can withdraw the paper and submit it to a journal with different policies (perhaps even an open access journal).

It is pretty common for the author to retain the right to distribute preprints.  

Congratulations on your paper!