I have the XD-40 Service. Lube and clean it before you take it to the range. I use Mobil 1 Synthetic oil. Works great and if you compare it in price per ounce against gun oil, it's a great bargain. Don't over lube! A little goes a long way. You literally only need a few drops.
As far as cleaning goes, some guys clean their XD's every few hundred to 1000 rounds. Other's, like me, clean it after every trip to the range and every week regardless if it has been fired or not. Kind of your call on that. I just field strip mine and try to get into every nook and cranny. Some guys will completely take it down. Again, your call.
Check out http://www.xdtalk.com/. You can get some good info on your XD there as well.