There is a maximum amount of earnings (wages and net profit from self-employment) on which you pay Social Security taxes each year.
The maximum amount has changed many times throughout the years. For 2017, the maximum amount of taxable earnings is $127,200.
Before 1994, there also was a maximum amount on which you paid Medicare taxes, but that maximum has been removed. You now pay Medicare taxes on all your wages and your net profit from self-employment.