To execute scripts in Sql Server Management Studio : first connect to a server then load a script file or write your own then press F5 to execute it.
If you want to execute a script from command prompt then consider
sqlcmd command.
Sqlcmd -S servername\SQLEXPRESS -i test.sql
read its parameters info at :
http://msdn.microsoft.com/en-us/library/ms165702.aspx[
^]
Ans if you want execute a script in your SQLs then consider using
sp_exectesql
read more at :
http://msdn.microsoft.com/en-us/library/ms188001.aspx[
^]