You will can take the bus or you can walk.
Just follow the signs to the terminal shuttle bus, which is free, and hop on. The buses leave every 5 minutes. It's about 10 minute trip give or take.
On foot 7 minutes minimum depends from what gate you are coming from and what gate you are going to which you don't know now.
You will have to clear security AND immigration at T1. One hour thirty minutes means if there are any delays of your arriving flight, you're very going to miss your flight. Don't forget that this is an international flight, you must get to check in counter at least about 45 minutes before your flight.
You're cutting it close. If you haven't purchased your ticket yet or you can change it without cost, I'll advise you change it to allow yourself time. Tickets from Barcelona to Madrid are very cheap if you even have to buy a new one altogether.
Good Luck!