Your rights depend on the airline you are flying with and their policies. Generally, if your first flight was late due to circumstances within the airline's control (such as mechanical issues or crew shortages), then they should be responsible for providing a refund or alternate travel arrangements.