Vanity is considered to be excessive pride, usually having being overly concerned with one's appearance. A person who looks at themselves in the mirror a lot would be displaying vanity.
Pride can be just a satisfaction in a job well done; however, it can also mean thinking you are better than your are. It depends on the context.
Some pride is considered good in western cultures, especially American, so long as it is not excessive. Pride is less valued in Chinese, Korean and Japanese cultures and any display of pride is looked down on.
In the end, pride can be good or bad, vanity always is considered a bad trait.