Both ESX(i) and vCenter exposes a web service API (vSphere API) and all SDKs (Perl, PowerCLI, VI Java, C#, etc) talk to this interface. Depending on what you're connecting to, you'll have different functionalities, methods and properties.
If you're new to VMware APIs/SDKs, you should give this document a good read through as it gives you quite a bit of background and how to get started -
=========================================================================
William Lam
VMware vExpert 2009,2010
VMware scripts and resources at:
Twitter: @lamw
Getting Started with the vMA (tips/tricks)
Getting Started with the vSphere SDK for Perl
VMware Code Central - Scripts/Sample code for Developers and Administrators
VMware Developer Community
If you find this information useful, please award points for "correct" or "helpful".