Avoiding hemorrhoids?

When having anal? I seem to be prone to being sore afterwards and getting hemorrhoids. Any way to prevent them or beat way to treat them afterwards?