McGarnagle has a great answer, and you'll want to be accepting his, but I thought I'd mention (since you asked) how databinding works.
It's generally implemented by firing events whenever a change is made to the data, which then causes listeners (e.g. the UI) to be updated.
Two-way binding works by doing this twice, with a bit of care taken to ensure that you don't wind up stuck in an event loop (where the update from the event causes another event to be fired).
I was gonna put this in a comment, but it was getting pretty long...