My friend has hiv, I wore his cap, I noticed that his cap has some fresh blood in it when I wear, I also has some wounds (fresh) on my head, can I get hiv?

Possibly. Although very improbable, fresh blood from an hiv+ person applied to an open wound of an hiv-negative person could theoretically cause infection in the latter. If this has occurred would suggest that you see an HIV specialist and be tested at standard intervals.