They can be quite similar, since the grammar and a lot of the vocabulary is shared. Even though I can only read Hindi and not Urdu, I can listen to Urdu and still understand a lot of what is said. Some words will likely be different. Urdu tends to lean toward having more words from Persian and Arabic. Hindi also has words from Persian and Arabic but also Sanskrit-derived words. For example, किताब (kitab or qitab) is used in both Urdu and Hindi, but पुस्तक (pustuk) you would be more likely to hear from a Hindi speaker rather than an Urdu speaker. (Both words mean "book.")
Also in Hindi, letters that represent Persian and Arabic sounds (क़, ख़, ग़ ज़), may or may not be strictly pronounced depending on the accent of the speaker. For example, some Hindi or Gujarati speakers might pronounce ज़ as "j" instead of "z." In Urdu, those sounds would pretty much always be pronounced as they would in Arabic.