1.
used to show that you are very grateful to sb for sth they have done :
Thanks a lot for all you've done.
2.
( ironic ) used to show that you are annoyed that sb has done sth because it causes trouble or difficulty for you :
'I'm afraid I've finished all the milk.' 'Well, thanks a lot!'