It may happen that you just got a new Android device and noticed later that the Android Market application is missing. If you got the phone brand new and with warranty from a carrier or specialized store, the first thing I suggest you do is go back and change it. Still, if you're lazy or you got yourself a used Android smartphone there are only a few things you could try to make the Android Market available on your phone.
Since it's now legal, the first thing you could do is root your device and install a custom ROM that usually provides applications separately. While I'm not against this method, I strongly suggest you avoid this if your phone is still under warranty and you're not an Android expert.
There are thousands of guides on the Internet that can teach you how to do it step by step, but all are starting with the usual “I'm not responsible for any damage ...”. So, while this method is 100% sure that will get you back your Android Market application, there's a chance that you might mess up one of the things described in the guide and brick your phone.
Another safer method to try to recover the Android Market is to simply make a factory reset. You will lose everything you have on the device, but even if your device isn't new I would still recommend a reset to erase any data that has been stored on your used device. You can make a factory reset by going to 'Menu', 'Settings', 'Privacy', and clicking on the “Factory Data Reset” option.
After the process is finished check your device for the Android Market and hopefully you will find it. The method works in about 50% of the cases, but if you still don't have it try the method below.
The reason you don't have Android Market might be because you have an old Android version, which missed the application for unknown reasons. So, you should try make a software update and hope for the best. To do that just go to 'Menu', 'Settings', 'About Phone', 'Software', and click on the option to check for new software updates.
If your version seems to be the newest, you can try check it manually on the Internet and found out if is there any update available. In case you find an update that you can only install manually, check out my guide on how to update your Android device manually.