It means good luck! / do well!
here's is a web site explaining the origins of that phrase:
http://www.yaelf.com/aueFAQ/mifbreakaleg.shtml
ex.
Break a leg in your game today.
Don't worry about your finals tomorrow, you will do great. Hang in there and break a leg!