In the recent mayoral election there were 15 or so candidates, with the top 2 going to a runoff. What would have happened if one candidate had received a majority of 51% of the vote in that election, would they still have had a runoff?
Assuming you're talking about the Chicago mayoral elections, the answer is No. A runoff would only be held if no candidate received a majority in the first round.
The Chicago Board of Election Commissioners, "2019 Election Information Pamphlet & Calendar," April 10, 2018 states on page 3 that:
The candidate receiving a majority of the votes cast for each office shall be declared elected. If no candidate receives a majority of the votes, a runoff election shall be held on April 2, 2019, when only the names of the candidates receiving the highest and second highest number of votes at the February 26, 2019 election shall appear on the ballot. [65 ILCS 20/21-5, 20/21-12; 10 ILCS 5/2A-1.1(b) and 5/2A-1.2(d)]
This isn't a universal rule. In Washington State, for example, the first round is a non-partisan "top-two" primary and the top 2 candidates advance to the general election even if one gets a majority.
The two candidates who receive the most votes in the Primary Election qualify for the General Election. Candidates must also receive at least 1% of the votes cast in that race to advance to the General Election