Sometimes the ads that appear in your Google search results or in Gmail are a bit of a mystery. That's why Google is now explaining how they work and rolling out two new features: one that gives you transparency into why the ads are appearing and one that lets you manage the ads that you see.According to Google, when you perform a search the search engine personalizes the ads that appear in your results by using additional information beyond what you just entered in the search box. For example, if you search for "restaurants" and then search again for "travel" followed by "Boston," the results page for the last search might contain ads for restaurants in Boston, based on the combination of the three searches.Google also gathers information to personalize ads via your Web History activity, by the pages you have +1'd or, in some countries, based on your visits to advertisers' websites, it says.Ads that appear in Gmail work similarly. In Gmail, most of the ads Google shows are related to the contents of the email conversation or thread. If you receive many emails about photography, for example, Google might show you a deal from a local camera store. Google says that these ads will appear in Gmail regardless of your preferences or settings, but they can be tweaked.It's also important to note that while Google will use information in your Web history and Gmail messages, it says it "does not and will never rent, sell or share information that personally identifies you for marketing purposes without your express permission...We provide advertisers only aggregated non-personal information such as the number of times one of their ads was clicked."Here's what you need to know about how Google ads work, and how you can change your preferences to achieve a level of privacy you're comfortable with.New Google Feature: "Why These Ads" LinkOne new feature that Google is rolling out to users over the next several weeks is a link below or next to ads that reads "Why these ads." Clicking on it will give you more information about why you're seeing it and how it's personalized for you.How to Block Google AdvertisersIf you're signed into your Google Account when you visit the Ads Preferences Manager, you can bock an advertiser. The Ads Preferences Manager is a Google site where you can manage settings associated with the ads you see. By visiting this page, you'll see an explanation on why you see specific ads and a list of interests that Google associates with you that can affect the ads you see on websites that have partnered with AdWords.If you choose to block an advertiser while you're signed in to your Google Account, you'll no longer see ads that link to that advertiser's website, whether you're on Google search or Gmail. You can unblock the advertiser at any time, and are allowed to block up to 500 advertisers.If, however, you're not signed into your Google Account, you'll still see some information associated with the computer's Web browser, Google says. In this case, though, the ads will be customized to a particular computer rather than to a personal account.How to Opt Out of Google's Personalized AdsIf you don't want to see personalized ads from Google, you can opt out at any time. After opting out, you'll still see relevant ads, but Google won't use additional information to personalize those ads on Google search and Gmail.Also, by opting out via the Ads Preferences page, you'll no longer be able to block specific advertisers, and your block list will be deleted.Note, however, that by staying opted-in to the personalized Google ads, Google says that it will show you fewer, but more relevant ads. "On the Ads Preferences Manager, you can see that on average, people who choose to get personalized ads click more ads but see less overall," Google says. "We calculate the statistics every month, using aggregate data from the prior three months in your location."How to Remove Your "Associated Interests" from GoogleBased on the websites you visit, the search terms you enter into Google and the advertising cookies that are stored in your browser, Google creates a profile of your related interests, which is a factor in the ads that you see. To view the interests and inferred demographics that Google has associated with you, visit the Ads Preferences page.Here, you have the option to add or remove your interests and opt out if you prefer the ads not be based on interests and demographic. You can also view the information about the cookie that Google stores to associate your ad preferences with the browser you're currently using.How to Disable Your Google Web HistoryBecause your Web history plays a role in the ads you see, you also have the option to disable it if you don't want Google tracking which websites you visit. To do this, you need to visit your Google Account Dashboard, which is home to nearly every preference related to your account imaginable.The information collected in your Web history includes websites you visit and Google searches, as well as your IP address, browser type, browser language and one or more cookies that may uniquely identify your browser. Almost down at the bottom of your Google Account Dashboard is the section for your Web history. Here, you can remove items from the list or disable Web history entirely.