According to the English Book of Common Prayer, "Easter Day is the first Sunday after the full moon which happens upon, or next after the 21st day of March; and if the full moon happens upon a Sunday, Easter Day is the Sunday after."
Why such an odd definition? March 21 is the usual date of the spring or vernal equinox -- the day on which the length of daylight equals the length of darkness as the days are lengthening in the spring. Sometimes the equinox falls on March 19, 20 or 22. But for simplicity's sake, most church leaders use March 21 as the start for determining the date of Easter. Using this method, Easter can only occur between March 22 and April 25.
The traditional Jewish calendar is based on moon phases, which is how the phase of the moon enters into the definition. Passover begins on the 15th of Nissan, based on the Jewish calendar, typically on the night of the first full moon after the vernal equinox. This could either be in March or April. That's why Passover and Easter celebration days often overlap or are close together. When Christians were determining what day Easter would fall on, they deferred to the Jewish practice of using moon phases to decide the timing of holidays.
Counting 40 days backward from Easter Sunday (not including any other Sundays) will give you the date for Ash Wednesday.