Raspberry pi gpio Dht sensor

I want to use the on board GPIO pins on raspberry pi (running home assistant) to read the values from the dht 11 sensor and also a ir transmitter. I have tried everything can anyone please explain stepwise process to do so.