<?xml version="1.0" encoding="us-ascii"?><InstanceReport xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Version>2.4.0.8</Version><ReportLongName>1130 - Disclosure - Commitments and Contingencies</ReportLongName><DisplayLabelColumn>true</DisplayLabelColumn><ShowElementNames>false</ShowElementNames><RoundingOption /><HasEmbeddedReports>false</HasEmbeddedReports><Columns><Column FlagID="0"><Id>1</Id><IsAbstractGroupTitle>false</IsAbstractGroupTitle><LabelSeparator>

</LabelSeparator><CurrencyCode /><FootnoteIndexer /><hasSegments>false</hasSegments><hasScenarios>false</hasScenarios><MCU><KeyName /><CurrencySymbol /><contextRef><ContextID>D2013Q2YTD</ContextID><EntitySchema>http://www.sec.gov/CIK</EntitySchema><EntityValue>0000077776</EntityValue><PeriodDisplayName /><PeriodType>duration</PeriodType><PeriodStartDate>2013-01-01T00:00:00</PeriodStartDate><PeriodEndDate>2013-06-30T00:00:00</PeriodEndDate><Segments /><Scenarios /></contextRef><UPS /><CurrencyCode /><OriginalCurrencyCode /></MCU><CurrencySymbol /><Labels><Label Key="CalendarSupplement" Id="0" Label="6 Months Ended" /><Label Key="Calendar" Id="1" Label="Jun. 30, 2013" /></Labels></Column></Columns><Rows><Row FlagID="0"><Id>1</Id><IsAbstractGroupTitle>true</IsAbstractGroupTitle><LabelSeparator>

</LabelSeparator><Level>1</Level><ElementName>us-gaap_CommitmentsAndContingenciesDisclosureAbstract</ElementName><ElementPrefix>us-gaap_</ElementPrefix><IsBaseElement>true</IsBaseElement><BalanceType>na</BalanceType><PeriodType>duration</PeriodType><IsReportTitle>false</IsReportTitle><IsSegmentTitle>false</IsSegmentTitle><IsCalendarTitle>false</IsCalendarTitle><IsEquityPrevioslyReportedAsRow>false</IsEquityPrevioslyReportedAsRow><IsEquityAdjustmentRow>false</IsEquityAdjustmentRow><IsBeginningBalance>false</IsBeginningBalance><IsEndingBalance>false</IsEndingBalance><IsReverseSign>false</IsReverseSign><FootnoteIndexer /><Cells><Cell FlagID="0" ContextID="" UnitID=""><Id>1</Id><IsNumeric>false</IsNumeric><IsRatio>false</IsRatio><DisplayZeroAsNone>false</DisplayZeroAsNone><NumericAmount>0</NumericAmount><RoundedNumericAmount>0</RoundedNumericAmount><NonNumbericText /><FootnoteIndexer /><CurrencyCode /><CurrencySymbol /><IsIndependantCurrency>false</IsIndependantCurrency><ShowCurrencySymbol>false</ShowCurrencySymbol><DisplayDateInUSFormat>false</DisplayDateInUSFormat></Cell></Cells><ElementDataType>xbrli:stringItemType</ElementDataType><SimpleDataType>string</SimpleDataType><IsTotalLabel>false</IsTotalLabel><UnitID>0</UnitID><Label>Commitments and Contingencies</Label></Row><Row FlagID="0"><Id>2</Id><IsAbstractGroupTitle>false</IsAbstractGroupTitle><LabelSeparator>

</LabelSeparator><Level>2</Level><ElementName>us-gaap_CommitmentsAndContingenciesDisclosureTextBlock</ElementName><ElementPrefix>us-gaap_</ElementPrefix><IsBaseElement>true</IsBaseElement><BalanceType>na</BalanceType><PeriodType>duration</PeriodType><IsReportTitle>false</IsReportTitle><IsSegmentTitle>false</IsSegmentTitle><IsCalendarTitle>false</IsCalendarTitle><IsEquityPrevioslyReportedAsRow>false</IsEquityPrevioslyReportedAsRow><IsEquityAdjustmentRow>false</IsEquityAdjustmentRow><IsBeginningBalance>false</IsBeginningBalance><IsEndingBalance>false</IsEndingBalance><IsReverseSign>false</IsReverseSign><PreferredLabelRole>terseLabel</PreferredLabelRole><FootnoteIndexer /><Cells><Cell FlagID="0" ContextID="D2013Q2YTD" UnitID=""><Id>1</Id><IsNumeric>false</IsNumeric><IsRatio>false</IsRatio><DisplayZeroAsNone>false</DisplayZeroAsNone><NumericAmount>0</NumericAmount><RoundedNumericAmount>0</RoundedNumericAmount><NonNumbericText>&lt;div style="font-size:10.0pt;font-family:Times New Roman;"&gt;
&lt;div style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 1pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in;"&gt;
&lt;p style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in;"&gt;&lt;b&gt;&lt;font style="FONT-FAMILY: Times New Roman; FONT-SIZE: 10pt; FONT-WEIGHT: bold;" size="2"&gt;13.&amp;#160; Commitments and Contingencies&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;&lt;/div&gt;
&lt;p style="TEXT-ALIGN: justify; MARGIN: 0in 0in 0pt;"&gt;&amp;#160;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt;"&gt;&lt;b&gt;&lt;font style="FONT-FAMILY: Times New Roman; FONT-SIZE: 10pt; FONT-WEIGHT: bold;" size="2"&gt;LEGAL CONTINGENCIES&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN: justify; MARGIN: 0in 0in 0pt;"&gt;&amp;#160;&lt;/p&gt;
&lt;p style="TEXT-ALIGN: justify; MARGIN: 0in 0in 0pt;"&gt;&lt;font style="FONT-FAMILY: Times New Roman; FONT-SIZE: 10pt;" size="2"&gt;The Company and its subsidiaries are defendants in various legal proceedings, which include private and civil litigation as well as government and regulatory examinations, investigations and inquiries or other requests for information.&amp;#160; These matters are at varying procedural stages and primarily relate to contractual disputes and other commercial, employment and tax claims.&amp;#160; The resolution of these various matters may result in adverse judgments, fines, penalties, injunctions and other relief against the Company as well as monetary payments or other agreements and obligations.&amp;#160; Alternately, the Company may engage in settlement discussions on certain matters in order to avoid the additional costs of engaging in litigation.&lt;/font&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN: justify; MARGIN: 0in 0in 0pt;"&gt;&amp;#160;&lt;/p&gt;
&lt;p style="TEXT-ALIGN: justify; MARGIN: 0in 0in 0pt;"&gt;&lt;font style="FONT-FAMILY: Times New Roman; FONT-SIZE: 10pt;" size="2"&gt;Reserves are established for pending or threatened litigation, claims or assessments when it is probable that a loss has been incurred and the amount of such loss can be reasonably estimated.&amp;#160; In light of the inherent uncertainties involved in litigation and other legal proceedings, it is not always possible to determine a reasonable estimate of the amount of a probable loss, and the Company may estimate a range of possible loss for consideration in its estimates.&amp;#160; The estimates are based upon currently available information and involve significant judgment taking into account the varying stages and inherent uncertainties of such matters.&amp;#160; Accordingly, the Company&amp;#8217;s estimates may change from time to time and such changes may be material to the consolidated financial results.&amp;#160; Given the inherent uncertainties and status of the Company&amp;#8217;s outstanding legal proceedings, the range of reasonably possible loss cannot be estimated for all matters.&amp;#160; For matters where the Company can estimate the range of losses, the aggregate estimated amount of reasonably possible losses in excess of the recorded liability was $10 million as of June&amp;#160;30, 2013.&lt;/font&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN: justify; MARGIN: 0in 0in 0pt;"&gt;&amp;#160;&lt;/p&gt;
&lt;p style="TEXT-ALIGN: justify; MARGIN: 0in 0in 0pt;"&gt;&lt;font style="FONT-FAMILY: Times New Roman; FONT-SIZE: 10pt;" size="2"&gt;As of June&amp;#160;30, 2013, the Company&amp;#8217;s recorded reserves associated with legal and regulatory contingencies were not material.&amp;#160; There can be no assurance, however, that the ultimate resolution of the Company&amp;#8217;s pending or threatened litigation, claims or assessments will not result in losses in excess of the Company&amp;#8217;s recorded reserves.&amp;#160; As a result, the ultimate resolution of any particular legal matter, or matters, could be material to the Company&amp;#8217;s results of operations or cash flows for the period in which such matter is resolved.&lt;/font&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN: justify; MARGIN: 0in 0in 0pt;"&gt;&amp;#160;&lt;/p&gt;
&lt;p style="TEXT-ALIGN: justify; MARGIN: 0in 0in 0pt;"&gt;&lt;font style="FONT-FAMILY: Times New Roman; FONT-SIZE: 10pt;" size="2"&gt;The following are descriptions of the Company&amp;#8217;s significant legal and regulatory matters, which may involve loss contingencies.&lt;/font&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN: justify; MARGIN: 0in 0in 0pt;"&gt;&amp;#160;&lt;/p&gt;
&lt;p style="TEXT-ALIGN: justify; MARGIN: 0in 0in 0pt;"&gt;&lt;i&gt;&lt;font style="FONT-STYLE: italic; FONT-FAMILY: Times New Roman; FONT-SIZE: 10pt;" size="2"&gt;Contingencies Involving Mortgage Origination and Servicing Practices&lt;/font&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN: justify; MARGIN: 0in 0in 0pt;"&gt;&amp;#160;&lt;/p&gt;
&lt;p style="TEXT-ALIGN: justify; MARGIN: 0in 0in 0pt;"&gt;&lt;font style="FONT-FAMILY: Times New Roman; FONT-SIZE: 10pt;" size="2"&gt;The Company has received inquiries and requests for information from, and is subject to investigations by, regulators and attorneys general of certain states,&lt;/font&gt; &lt;font style="FONT-SIZE: 10pt;" size="2"&gt;the U.S. Department of Housing and Urban Development, the U.S. Attorney&lt;/font&gt;&lt;font style="FONT-SIZE: 10pt;" size="2"&gt;&amp;#8217;&lt;/font&gt;&lt;font style="FONT-SIZE: 10pt;" size="2"&gt;s Office for the Southern District of New York,&lt;/font&gt; &lt;font style="FONT-SIZE: 10pt;" size="2"&gt;the Committee on Oversight and Government Reform of the U.S. House of Representatives and the U.S. Senate Judiciary Committee, requesting information as to the Company&amp;#8217;s mortgage origination and servicing practices, including its foreclosure processes and procedures.&lt;/font&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN: justify; MARGIN: 0in 0in 0pt;"&gt;&amp;#160;&lt;/p&gt;
&lt;p style="TEXT-ALIGN: justify; MARGIN: 0in 0in 0pt;"&gt;&lt;font style="FONT-FAMILY: Times New Roman; FONT-SIZE: 10pt;" size="2"&gt;During the three months ended June&amp;#160;30, 2013, the Company received document subpoenas from the Office of Inspector General of t&lt;/font&gt;&lt;font style="FONT-SIZE: 10pt;" size="2"&gt;he U.S. Department of Housing and Urban Development (&amp;#8220;HUD&amp;#8221;&lt;/font&gt;&lt;font style="FONT-SIZE: 10pt;" size="2"&gt;) and the U.S. Attorney&lt;/font&gt;&lt;font style="FONT-SIZE: 10pt;" size="2"&gt;&amp;#8217;&lt;/font&gt;&lt;font style="FONT-SIZE: 10pt;" size="2"&gt;s Office for the Southern District of New York.&amp;#160; The HUD subpoenas request production of certain documents related to, among other things, our origination and underwriting pro&lt;/font&gt;&lt;font style="FONT-SIZE: 10pt;" size="2"&gt;cess for loans insured by the Federal Housing Administration (&amp;#8220;FHA&amp;#8221;&lt;/font&gt;&lt;font style="FONT-SIZE: 10pt;" size="2"&gt;).&amp;#160; The U.S. Attorney&lt;/font&gt;&lt;font style="FONT-SIZE: 10pt;" size="2"&gt;&amp;#8217;&lt;/font&gt;&lt;font style="FONT-SIZE: 10pt;" size="2"&gt;s Office subpoena requests production of certain documents related to, among other things, foreclosure expenses that we incurred in connection with the foreclosure of loans insured or guaranteed by FHA, Fannie Mae or Freddie Mac.&lt;/font&gt; &lt;font style="FONT-SIZE: 10pt;" size="2"&gt;In addition, the New Jersey Attorney General has conducted an investigation of the Company&amp;#8217;s servicing practices and has informed the Company that it believes that the Company has violated the New Jersey Consumer Fraud Act in connection with customer service and other matters related to loss mitigation activities for certain borrowers in the wake of the financial crisis.&amp;#160; The Company has also undergone a regulatory examination by a multistate coalition of certain mortgage banking regulators and such regulators have alleged various violations of federal and state laws related to the Company&amp;#8217;s mortgage servicing practices prior to July&amp;#160;2011.&lt;/font&gt;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt;"&gt;&amp;#160;&lt;/p&gt;
&lt;p style="TEXT-ALIGN: justify; MARGIN: 0in 0in 0pt;"&gt;&lt;font style="FONT-FAMILY: Times New Roman; FONT-SIZE: 10pt;" size="2"&gt;The Company believes it has meritorious defenses to these various allegations.&amp;#160; However, there can be no assurance that claims or litigation will not arise from these inquiries, or similar inquiries by other governmental authorities, or that fines, penalties or increased legal costs will not be incurred in connection with these matters.&lt;/font&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN: justify; MARGIN: 0in 0in 0pt;"&gt;&amp;#160;&lt;/p&gt;
&lt;p style="TEXT-ALIGN: justify; MARGIN: 0in 0in 0pt;"&gt;&lt;font style="FONT-FAMILY: Times New Roman; FONT-SIZE: 10pt;" size="2"&gt;In addition to the increased regulatory focus on origination and servicing practices described above, Fannie Mae and Freddie Mac have also had a continued focus on foreclosure practices.&amp;#160; They have assessed compensatory fees against the Company for failing to meet certain foreclosure timelines specified in their respective servicing guides.&amp;#160; Although such compensatory fees have not been material to date, there can be no assurance that the assessment of any such compensatory fees will not be material to the Company&amp;#8217;s results in the future.&lt;/font&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN: justify; MARGIN: 0in 0in 0pt;"&gt;&amp;#160;&lt;/p&gt;
&lt;p style="MARGIN: 0in 0in 0pt;"&gt;&lt;i&gt;&lt;font style="FONT-STYLE: italic; FONT-FAMILY: Times New Roman; FONT-SIZE: 10pt;" size="2"&gt;CFPB Investigation&lt;/font&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p style="TEXT-ALIGN: justify; MARGIN: 0in 0in 0pt;"&gt;&amp;#160;&lt;/p&gt;
&lt;p style="TEXT-ALIGN: justify; MARGIN: 0in 0in 0pt;"&gt;&lt;font style="FONT-FAMILY: Times New Roman; FONT-SIZE: 10pt;" size="2"&gt;In January&amp;#160;2012, the Company was notified that the Bureau of Consumer Financial Protection (the &amp;#8220;CFPB&amp;#8221;) had opened an investigation to determine whether the Company&amp;#8217;s mortgage insurance premium ceding practices to captive reinsurers comply with the Real Estate Settlement Procedures Act and other laws enforced by the CFPB. The CFPB has requested certain related documents and information for review and has requested a response to written questions pursuant to a Civil Investigative Demand and the investigative demand is still ongoing.&amp;#160; The Company has provided reinsurance services in exchange for premiums ceded and believes that it has complied with the Real Estate Settlement Procedures Act and other laws applicable to the Company&amp;#8217;s mortgage reinsurance activities.&amp;#160; The Company did not provide reinsurance on loans originated after 2009.&lt;/font&gt;&lt;/p&gt;
&lt;/div&gt;</NonNumbericText><FootnoteIndexer /><CurrencyCode /><CurrencySymbol /><IsIndependantCurrency>false</IsIndependantCurrency><ShowCurrencySymbol>false</ShowCurrencySymbol><DisplayDateInUSFormat>false</DisplayDateInUSFormat></Cell></Cells><ElementDataType>nonnum:textBlockItemType</ElementDataType><SimpleDataType>na</SimpleDataType><ElementDefenition>The entire disclosure for commitments and contingencies.</ElementDefenition><ElementReferences>Reference 1: http://www.xbrl.org/2003/role/presentationRef

 -Publisher FASB

 -Name FASB Interpretation (FIN)

 -Number 14

 -Paragraph 3

 -LegacyDoc This reference is SUPERSEDED by the Accounting Standards Codification effective for interim and annual periods ending after September 15, 2009.  This reference is included to help users transition from the previous accounting hierarchy and will be removed from future versions of this taxonomy.



Reference 2: http://www.xbrl.org/2003/role/presentationRef

 -Publisher FASB

 -Name Accounting Standards Codification

 -Topic 210

 -SubTopic 10

 -Section S99

 -Paragraph 1

 -Subparagraph (SX 210.5-02.25)

 -URI http://asc.fasb.org/extlink&amp;oid=6877327&amp;loc=d3e13212-122682



Reference 3: http://www.xbrl.org/2003/role/presentationRef

 -Publisher FASB

 -Name Accounting Standards Codification

 -Topic 825

 -SubTopic 20

 -Section 50

 -Paragraph 1

 -URI http://asc.fasb.org/extlink&amp;oid=6449706&amp;loc=d3e16207-108621



Reference 4: http://www.xbrl.org/2003/role/presentationRef

 -Publisher FASB

 -Name Accounting Standards Codification

 -Topic 460

 -SubTopic 10

 -Section 50

 -Paragraph 8

 -URI http://asc.fasb.org/extlink&amp;oid=6398077&amp;loc=d3e12565-110249



Reference 5: http://www.xbrl.org/2003/role/presentationRef

 -Publisher FASB

 -Name Accounting Standards Codification

 -Topic 450

 -SubTopic 20

 -Section 50

 -Paragraph 4

 -URI http://asc.fasb.org/extlink&amp;oid=6952336&amp;loc=d3e14435-108349



Reference 6: http://www.xbrl.org/2003/role/presentationRef

 -Publisher FASB

 -Name Accounting Standards Codification

 -Topic 440

 -SubTopic 10

 -Section 50

 -Paragraph 2

 -URI http://asc.fasb.org/extlink&amp;oid=6394976&amp;loc=d3e25287-109308



Reference 7: http://www.xbrl.org/2003/role/presentationRef

 -Publisher FASB

 -Name Statement of Financial Accounting Standard (FAS)

 -Number 5

 -Paragraph 9, 10, 11, 12

 -LegacyDoc This reference is SUPERSEDED by the Accounting Standards Codification effective for interim and annual periods ending after September 15, 2009.  This reference is included to help users transition from the previous accounting hierarchy and will be removed from future versions of this taxonomy.



</ElementReferences><IsTotalLabel>false</IsTotalLabel><UnitID>0</UnitID><Label>Commitments and Contingencies</Label></Row></Rows><Footnotes /><IsEquityReport>false</IsEquityReport><ReportName>Commitments and Contingencies</ReportName><MonetaryRoundingLevel>UnKnown</MonetaryRoundingLevel><SharesRoundingLevel>UnKnown</SharesRoundingLevel><PerShareRoundingLevel>UnKnown</PerShareRoundingLevel><ExchangeRateRoundingLevel>UnKnown</ExchangeRateRoundingLevel><HasCustomUnits>true</HasCustomUnits><IsEmbedReport>false</IsEmbedReport><IsMultiCurrency>false</IsMultiCurrency><ReportType>Sheet</ReportType><RoleURI>http://www.phh.com/role/DisclosureCommitmentsAndContingencies</RoleURI><NumberOfCols>1</NumberOfCols><NumberOfRows>2</NumberOfRows></InstanceReport>
