You can convert strings to numbers using the function tonumber(). This takes a string argument and returns a number.
> print(tonumber("123") + 25)
148
> x = tonumber("123.456e5")
> print(x)
12345600
If a non-number string is passed, the tonumber() function returns "nil".
> x = tonumber("hello")
> print(x)
nil