When you arrive at a party, immediately seek out your host and hostess and speak to them. If there is a guest of honor, meet and speak to him. Circulate - don't stay in one corner with a few friends all evening. Keep the conversation light. Save the heavy controversial subjects for good late night arguments with close friends. You have an obligation to be charming. Your host has gone to considerable trouble and expense to provide you with a pleasurable social experience.
If you happen to be in a lousy mood or don't feel well that evening, it's not very gracious to let that be obvious. Be a good guest and act like you are having a great time. Find the host or hostess before you leave and express your appreciation for the evening as you say your good byes.