<?xml version="1.0" encoding="us-ascii"?><InstanceReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><Version>2.2.0.25</Version><hasSegments>false</hasSegments><hasScenarios>false</hasScenarios><ReportLongName>0209 - Disclosure - Commitments and Contingencies</ReportLongName><DisplayLabelColumn>true</DisplayLabelColumn><ShowElementNames>false</ShowElementNames><RoundingOption /><HasEmbeddedReports>false</HasEmbeddedReports><Columns><Column><Id>1</Id><IsAbstractGroupTitle>false</IsAbstractGroupTitle><LabelColumn>false</LabelColumn><CurrencyCode>USD</CurrencyCode><FootnoteIndexer /><hasSegments>false</hasSegments><hasScenarios>false</hasScenarios><MCU><KeyName>1/1/2011 - 3/31/2011
USD ($)

USD ($) / shares
</KeyName><CurrencySymbol>$</CurrencySymbol><contextRef><ContextID>Jan-01-2011_Mar-31-2011</ContextID><EntitySchema>http://www.sec.gov/CIK</EntitySchema><EntityValue>0001131096</EntityValue><PeriodDisplayName /><PeriodType>duration</PeriodType><PeriodStartDate>2011-01-01T00:00:00</PeriodStartDate><PeriodEndDate>2011-03-31T00:00:00</PeriodEndDate><Segments /><Scenarios /></contextRef><UPS><UnitProperty><UnitID>USD</UnitID><UnitType>Standard</UnitType><StandardMeasure><MeasureSchema>http://www.xbrl.org/2003/iso4217</MeasureSchema><MeasureValue>USD</MeasureValue><MeasureNamespace>iso4217</MeasureNamespace></StandardMeasure><Scale>0</Scale></UnitProperty><UnitProperty><UnitID>Shares</UnitID><UnitType>Standard</UnitType><StandardMeasure><MeasureSchema>http://www.xbrl.org/2003/instance</MeasureSchema><MeasureValue>shares</MeasureValue><MeasureNamespace>xbrli</MeasureNamespace></StandardMeasure><Scale>0</Scale></UnitProperty><UnitProperty><UnitID>USDEPS</UnitID><UnitType>Divide</UnitType><NumeratorMeasure><MeasureSchema>http://www.xbrl.org/2003/iso4217</MeasureSchema><MeasureValue>USD</MeasureValue><MeasureNamespace>iso4217</MeasureNamespace></NumeratorMeasure><DenominatorMeasure><MeasureSchema>http://www.xbrl.org/2003/instance</MeasureSchema><MeasureValue>shares</MeasureValue><MeasureNamespace>xbrli</MeasureNamespace></DenominatorMeasure><Scale>0</Scale></UnitProperty></UPS><CurrencyCode>USD</CurrencyCode><OriginalCurrencyCode>USD</OriginalCurrencyCode></MCU><CurrencySymbol>$</CurrencySymbol><Labels><Label Id="1" Label="3 Months Ended" /><Label Id="2" Label="Mar. 31, 2011" /></Labels></Column></Columns><Rows><Row><Id>2</Id><IsAbstractGroupTitle>true</IsAbstractGroupTitle><Level>0</Level><ElementName>athn_CommitmentsAndContingenciesAbstract</ElementName><ElementPrefix>athn</ElementPrefix><IsBaseElement>false</IsBaseElement><BalanceType>na</BalanceType><PeriodType>duration</PeriodType><ShortDefinition>Commitments and contingencies.</ShortDefinition><IsReportTitle>false</IsReportTitle><IsSegmentTitle>false</IsSegmentTitle><IsSubReportEnd>false</IsSubReportEnd><IsCalendarTitle>false</IsCalendarTitle><IsTuple>false</IsTuple><IsEquityPrevioslyReportedAsRow>false</IsEquityPrevioslyReportedAsRow><IsEquityAdjustmentRow>false</IsEquityAdjustmentRow><IsBeginningBalance>false</IsBeginningBalance><IsEndingBalance>false</IsEndingBalance><IsReverseSign>false</IsReverseSign><PreferredLabelRole /><FootnoteIndexer /><Cells><Cell><Id>1</Id><IsNumeric>false</IsNumeric><IsRatio>false</IsRatio><DisplayZeroAsNone>false</DisplayZeroAsNone><NumericAmount>0</NumericAmount><RoundedNumericAmount>0</RoundedNumericAmount><NonNumbericText /><NonNumericTextHeader /><FootnoteIndexer /><CurrencyCode /><CurrencySymbol /><IsIndependantCurrency>false</IsIndependantCurrency><ShowCurrencySymbol>false</ShowCurrencySymbol><DisplayDateInUSFormat>false</DisplayDateInUSFormat><hasSegments>false</hasSegments><hasScenarios>false</hasScenarios></Cell></Cells><OriginalInstanceReportColumns /><Unit>Other</Unit><ElementDataType>xbrli:stringItemType</ElementDataType><SimpleDataType>string</SimpleDataType><ElementDefenition>Commitments and contingencies.</ElementDefenition><IsTotalLabel>false</IsTotalLabel><IsEPS>false</IsEPS><Label>Commitments and Contingencies [Abstract]</Label></Row><Row><Id>3</Id><IsAbstractGroupTitle>false</IsAbstractGroupTitle><Level>0</Level><ElementName>us-gaap_CommitmentsAndContingenciesDisclosureTextBlock</ElementName><ElementPrefix>us-gaap</ElementPrefix><IsBaseElement>true</IsBaseElement><BalanceType>na</BalanceType><PeriodType>duration</PeriodType><ShortDefinition>No definition available.</ShortDefinition><IsReportTitle>false</IsReportTitle><IsSegmentTitle>false</IsSegmentTitle><IsSubReportEnd>false</IsSubReportEnd><IsCalendarTitle>false</IsCalendarTitle><IsTuple>false</IsTuple><IsEquityPrevioslyReportedAsRow>false</IsEquityPrevioslyReportedAsRow><IsEquityAdjustmentRow>false</IsEquityAdjustmentRow><IsBeginningBalance>false</IsBeginningBalance><IsEndingBalance>false</IsEndingBalance><IsReverseSign>false</IsReverseSign><PreferredLabelRole>verboselabel</PreferredLabelRole><FootnoteIndexer /><Cells><Cell><Id>1</Id><IsNumeric>false</IsNumeric><IsRatio>false</IsRatio><DisplayZeroAsNone>false</DisplayZeroAsNone><NumericAmount>0</NumericAmount><RoundedNumericAmount>0</RoundedNumericAmount><NonNumbericText>&lt;!--DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" --&gt;
   &lt;!-- Begin Block Tagged Note 9 - us-gaap:CommitmentsAndContingenciesDisclosureTextBlock--&gt;
   &lt;div style="font-family: 'Times New Roman',Times,serif"&gt;
   &lt;div align="left" style="font-size: 10pt; margin-top: 12pt"&gt;&lt;b&gt;9. COMMITMENTS AND CONTINGENCIES&lt;/b&gt;
   &lt;/div&gt;
   &lt;div align="left" style="font-size: 10pt; margin-top: 6pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;On March&amp;#160;2, 2010, a complaint was filed by &lt;i&gt;Prompt Medical Systems, L.P. &lt;/i&gt;naming the Company and
   several other defendants in a patent infringement case (Prompt Medical Systems, L.P. v.
   AllscriptsMisys Healthcare Solutions, Inc. et al., Civil Action No.&amp;#160;6:2010cv00071, United States
   District Court for the Eastern District of Texas). The complaint alleges that the Company has
   infringed on U.S. Patent No.&amp;#160;5,483,443 with a listed issue date of January&amp;#160;9, 1996 entitled &amp;#8220;Method
   for Computing Current Procedural Terminology Codes from Physician Generated Documentation.&amp;#8221; The
   complaint seeks an injunction enjoining infringement, damages, and pre- and post-judgment costs and
   interest. The Company and other several defendants filed motions to dismiss the complaint. On
   February&amp;#160;11, 2011, the Court issued an Order granting-in-part and denying-in-part the motions
   to dismiss. The Court ordered the plaintiff to replead certain claims within fourteen days of the
   Order, and the plaintiff filed its amended complaint on
   February&amp;#160;23, 2011. The Company filed its answer to the amended
   complaint and declaratory judgment counterclaims of non-infringement,
   invalidity, and unenforceability on March&amp;#160;9, 2011.
   &lt;/div&gt;
   &lt;div align="left" style="font-size: 10pt; margin-top: 6pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;On November&amp;#160;24, 2010, several defendants filed (i)&amp;#160;a motion for summary judgment of invalidity
   against the patent-in-suit on the basis that it claims only non-patentable subject matter; and (ii)
   a motion to stay all proceedings pending the resolution of the motion for summary judgment. The
   Company filed a motion to join in the motion to stay the proceedings. The motions are fully briefed
   and awaiting a decision by the Court.
   &lt;/div&gt;
   &lt;div align="left" style="font-size: 10pt; margin-top: 6pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;The case is currently in the discovery phase. A claim construction hearing is scheduled for
   November&amp;#160;11, 2011. Trial is scheduled for June&amp;#160;11, 2012.
   &lt;/div&gt;
   &lt;div align="left" style="font-size: 10pt; margin-top: 6pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;The Company is being indemnified in this lawsuit from and against any liability and reasonable
   costs, including attorneys fees, incurred by the Company in its defense, pursuant to a license
   agreement with its vendor.
   &lt;/div&gt;
   &lt;div align="left" style="font-size: 10pt; margin-top: 6pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;The Company believes that it has meritorious defenses to the lawsuit and continues to contest
   it vigorously.
   &lt;/div&gt;
   &lt;div align="left" style="font-size: 10pt; margin-top: 6pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;On March&amp;#160;19, 2010, a putative shareholder class action complaint was filed in the United
   States District Court for the District of Massachusetts against the Company and certain of its
   current and former officers entitled Casula v. athenahealth, Inc. et al, Civil Action No.
   1:10-cv-10477. On June&amp;#160;3, 2010, the court appointed Waterford Township General Employees Retirement
   System as the lead plaintiff. On August&amp;#160;2, 2010, the lead plaintiff filed an amended complaint. The
   amended complaint alleges that the defendants violated the federal securities laws by disseminating
   false and misleading statements through press releases, statements by senior management, and SEC
   filings. The alleged false and misleading statements concern, among other things, the amortization
   period for deferred implementation revenues. The amended complaint seeks unspecified damages,
   costs, and expenses. The defendants filed a motion to dismiss the amended complaint on October&amp;#160;1,
   2010, and a reply brief in further support of the motion to dismiss the amended complaint on
   December&amp;#160;30, 2010. The Company believes that it has meritorious defenses to the amended complaint
   and will contest the claims vigorously.
   &lt;/div&gt;
   &lt;div align="left" style="font-size: 10pt; margin-top: 6pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;On March&amp;#160;17, 2011, a complaint was filed by &lt;i&gt;PPS Data, LLC &lt;/i&gt;naming the Company and several other
   defendants in a patent infringement case (PPS Data, LLC v. Allscripts Healthcare Solutions, Inc. et
   al, Civil Action No.&amp;#160;3:11-CU-273-J-99MMH-TEM, United States District Court for the Middle District
   of Florida). The complaint alleges that the Company has infringed on U.S. Patent No.&amp;#160;6,343,271 with
   a listed issue date of January&amp;#160;29, 2002 entitled &amp;#8220;Electronic Creation, Submission, Adjudication,
   and Payment of Health Insurance Claims.&amp;#8221; The complaint seeks an injunction enjoining infringement,
   damages, pre- and post-judgment costs and interest, and attorneys&amp;#8217; fees. On April&amp;#160;14, 2011, the
   Company filed a motion to dismiss, or, in the alternative a motion for summary judgment. The
   Company believes that it has meritorious defenses to the complaint and will contest the claims
   vigorously.
   &lt;/div&gt;
   &lt;div align="left" style="font-size: 10pt; margin-top: 6pt"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;In addition, from time to time the Company may be subject to other legal proceedings, claims,
   and litigation arising in the ordinary course of business. The Company does not, however, currently
   expect that the ultimate costs to resolve any pending matter will have a material adverse effect on
   the Company&amp;#8217;s consolidated financial position, results of operations, or cash flows. There are no
   accruals for such claims recorded at March&amp;#160;31, 2011.
   &lt;/div&gt;
   &lt;/div&gt;
</NonNumbericText><NonNumericTextHeader>&lt;!--DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" --&gt;
   &lt;!-- Begin Block Tagged Note</NonNumericTextHeader><FootnoteIndexer /><CurrencyCode /><CurrencySymbol /><IsIndependantCurrency>false</IsIndependantCurrency><ShowCurrencySymbol>false</ShowCurrencySymbol><DisplayDateInUSFormat>false</DisplayDateInUSFormat><hasSegments>false</hasSegments><hasScenarios>false</hasScenarios></Cell></Cells><OriginalInstanceReportColumns /><Unit>Other</Unit><ElementDataType>us-types:textBlockItemType</ElementDataType><SimpleDataType>string</SimpleDataType><ElementDefenition>Includes disclosure of commitments and contingencies. This element may be used as a single block of text to encapsulate the entire disclosure including data and tables.</ElementDefenition><ElementReferences>Reference 1: http://www.xbrl.org/2003/role/presentationRef
 -Publisher FASB
 -Name FASB Interpretation (FIN)
 -Number 14
 -Paragraph 3

Reference 2: http://www.xbrl.org/2003/role/presentationRef
 -Publisher FASB
 -Name Statement of Financial Accounting Standard (FAS)
 -Number 5
 -Paragraph 9, 10, 11, 12

</ElementReferences><IsTotalLabel>false</IsTotalLabel><IsEPS>false</IsEPS><Label>COMMITMENTS AND CONTINGENCIES</Label></Row></Rows><Footnotes /><NumberOfCols>1</NumberOfCols><NumberOfRows>2</NumberOfRows><ReportName>Commitments and Contingencies</ReportName><MonetaryRoundingLevel>UnKnown</MonetaryRoundingLevel><SharesRoundingLevel>UnKnown</SharesRoundingLevel><PerShareRoundingLevel>UnKnown</PerShareRoundingLevel><ExchangeRateRoundingLevel>UnKnown</ExchangeRateRoundingLevel><HasCustomUnits>false</HasCustomUnits><SharesShouldBeRounded>true</SharesShouldBeRounded></InstanceReport>
