[v1 stem] + なさい [v5 masu-stem] + なさい [する → し] + なさい [来る → き] + なさい
なさい is a mild command form used to tell someone to do something. It is formed by attaching なさい to the verb stem (the masu-stem). While it is softer than the blunt imperative form (e.g. しろ), it still carries clear authority and is not used toward superiors or equals. It is most common by parents speaking to children, teachers to students, or in written instructions such as exam directions.
Remove ます from the polite form and add なさい:
なさい sits between 〜~てください (polite request) and the plain imperative (e.g. かけ書け、たべろ食べろ) in terms of directness. It sounds parental or instructional rather than rude, but it is clearly a command, not a request.
In casual speech, なさい is often shortened to ~な (with a falling intonation). This is very common among parents and close authority figures.
Be careful not to confuse this shortened な with the prohibitive な (e.g. いく行くな "don't go!"), which attaches to the dictionary form.