There are several definitions of both words. Here are a few common ones:
confirm:
to verify; or to establish the truth of something
"I saw my boyfriend with another girl, which confirmed my suspicions he was cheating on me. "
to formally appoint someone to an important position position
"The mayor confirmed Mr. Smith's appointment to the City Council."
to establish that something will happen at a specific time and place; to make certain
"I called and confirmed my dentist appointment for 2:00 pm."
declare:
to formally announce something; to officially state something; to proclaim
"The United States declared its independence from Great Britain on July 4, 1776."
to tell a customs official the value of goods you purchased in a foreign country
"I had to declare my camera that I bought in Japan when I arrived at the airport in Chicago."
to strongly state you will or won't do something
"He acted so badly on our first date that I declared I would never go out with him again."