How can you get your penis hard?

When the penis is hard, that is called an erection. You get an erection in response to sexual stimulation. So you should first figure out what is sexually stimulating to you. Since different people find different things sexually stimulating, that is something that you will have to discover for yourself. But in general, it is either naked women or naked men (depending upon your sexual orientation).

When you get sexually aroused, your penis should get hard. You could also get an erection upon awakening.