If your computer is not working on a task, the task will be considered as "missed the deadline" in 21 days.
If it is actually chugging along on it, the deadline will be extended. You can find more information on this searching deeper into the forums, it was discussed when introduced.
There is a hard limit to those extensions, though. The second number is the longest the deadline could possibly become.
The server knows about your work on the unit being done due to the "trickle messages", which are a functionality of BOINC. One thing to keep in mind is their precision is only to 1% of the work done on the workunit.
The other thing to keep in mind is that the deadline is only extended on the server. You will still see the original deadline in your BOINC client.