The easiest solution in most cases is to buy an OPC Client for your particular programming language. National Instruments ComponentWorks acts as an OPC Client. Likewise, several other vendors also make OPC Client add-ons for Visual Basic, Visual C++, etc...
If you really want to program your own OPC Client, then you can find information on the OPC specifications at www.opcfoundation.org
Regards,
Aaron
LabVIEW Champion, CLA, CPI