Welcome to Wolfram Community!
We use special formatting for code that you should follow - see HERE how.
I think you need to approach this differently. But I fixed your code so at least it works as I think you intended it to:
puissance[x_, n_] := Module[{res, i},
res = x;
For[i = 1, i < n, i++, res = res*x];
Return[res]]
puissance[3, 3]
(*27*)
characters[string_] := Module[{s = {}, i},
For[i = 1, i <= StringLength[string], i++, AppendTo[s, StringTake[string, {i}]]];
Return[s]]
characters["A string"]
(*{"A"," ","s","t","r","i","n","g"}*)
Now you have to understand that Wolfram Language or WL (Mathematica is programing environment) is a functional programming language. You seem to use a lot of procedural (loops, cycles) constructs, are you sure you need to? Here is my solutions to you problems if I understood them correctly.
power[s_String, n_Integer] := ToExpression[s]^n;
power["3", 3]
(*27*)
StringTake["123456789", {3, 5}]
(*"345"*)
This maybe not what you need, but at least it shows how simple is functional form comparing to procedural, because it is native for WL.