How to properly use Unit Tests (in any language)

tjs*_*ons 5 python testing unit-testing

I've never really written unit tests before (or tests, for that matter, really). I tend to obsessively run/compile after writing even the smallest bit of code to check for errors. I've been doing a bit of reading up on unit tests lately, and I'm curious how to best go about using/implementing them. My main language as of late has been Python, but I think this is a pretty language agnostic question. Does anyone have some tips (or good reading) on how to do this properly?

Thanks!