There are multiple ways to achieve that, some are depending on the OS your computer runs.
Simple VCard exchange
Open your contacts app, open its menu. You should find an item to export your contacts to your device's SDCard (usually in a sub-menu called "Import/Export"). Hitting that will write a file named 0001.vcf
or similar to the SDCard toot directory.
Copy that file to your computer. Most contact applications are able to open/import the file, which is using standard VCard format.
Specific application
There are specific applications available for that task, often having an Android app for the device and a specific computer counterpart. The probably most famous of them is MyPhoneExplorer, which not only deals with your contacts, but also calendars and much more. This software requires MS Windows on your computer.
Other Synchronization Services
There are plenty of different "servers" available to synchronize Contacts (and Calendars, and more) between devices. I e.g. use ownCloud with my devices, which gives me complete control over my data. As with the previous item, this requires a local app and a remote component.
Others
You can find a list of possibilities for synchronization in my app listings, specifically: Synchronization of Calendars, Contacts, etc.. My list for Backup apps also has a dedicated section on contacts. Those backups you can copy to your computer then as well, but rarely import to any computer program. If you want to directly access your Android's contact lists from your computer, you might also wish to take a look into Manage your Android Device from your Computer.