It is decided on the basis of parameters received in SIB2 PRACH configurations.
UE can use 6 Resource blocks for sending the RACH Request.
From PRACH Config Index - There is a mapping in spec 36211 table 5.7.1-2 from which UE can find the available subframes where it can send a RACH.
For example:- Prach Config index value = 7, From table it is clear that UE can send a RACH Req in any system frame but subframe should be 2 and 7.
From PRACH Frequency Offset - This value is also received in SIB2 by UE. It governs which frequency resource UE can use for the RACH Req.
Example:- If the value of PRACH Freq Offset is 10. UE can use the 6 PRB's starting from PRB 10 for RACH Request.