Datablocks plugs mayaapi

what is the use of datablocks and plugs in maya?
any example or code snippets?

Plenty of examples in the maya documentation - Developer Resources, Example Plugins