What is the correct way to apply foundation?

I am 18 years old and am caramel skin tone. I wear MAC foundation and it works really well. Now the only problem lies in,that it comes off on everything. It gets on people whom I hug and on my fingers and on everything I touch. It hardly stays on and after every 3 hours, I have to re-apply it. Do you have any advice for me?