Strings and their masses How do strings present in particles give mass to them? Is it only by vibrating? I have been trying to find the answer but could not find it anywhere, can this question be answered?
 A: While it is true that an excited string (hence one with a vibration mode above the ground state) looks like a massive particle from far away, this is not the effect that is supposed to explain the mass of any particle ever seen. This is because the mass of the first excited mode of the string is already huge as far as particle masses go. So in string phenomenology, instead, all particles are modeled by strings in their massless ground state excitation and the actual observed masses are induced, as it should be, by a Higgs effect.
While the excited string states are not supposed to show up at energy scales anywhere close to what is being observed, their presence is still crucial: it is all these heavy particle excitations whose appearance as "virtual particles" in scattering amplitudes serve to make string scattering amplitudes be loop-wise finite, hence renormalized.
See the nLab String Theory FAQ the entry How do strings model massive particles?.
A: I presume that you are asking about the mass spectrum of string theories.   
The mass spectrum of a Classical  string theory, or the mass of a string is (due to Special Relativity)   given, by:  
$$m=\sqrt{-p^\mu p_\mu}=\sqrt N   $$      
In natural units $c_0=\ell_s=\hbar=1$.     Where $N$ is an operator, called the "Number Operator". In Classical string theories, this is continuous.   When we quantise the theory, we   realise  that the new mass spectrum is actually given by:    
$$m=\sqrt{N-a}   $$
Where $a$ is called the normal ordering constant.      Now, $N$ is going to take discrete values, multiples of $\frac12$.   
In Bosonic String Theory, $a=1$. In superstring theories, $a$ depends on the sector you' are talking about; it is $0$ in the Neveu-Schwarz sector, and $\frac12$ in the Ramond sector.   
Of course, In GSO Projected theories (i.e. the tachyon is removed (yes, even in the RNS (Ramond-Neveu-Schwarz)    Superstring, there are tachyons if you don't GSO Project; although this problem is absent in the GS (Green-Schwarz) Superstring))  , a GSO Projection gets rid of certain states and so on, but let's keep things simple right now.     
Now, I've only been talking about open strings. What about the closed strings, which are more important, because the open strings are present only in the Type I Superstring theory (and Bosonic, of course (and probably also Type 0A and 0B (not sure))), whereas the closed strings are there in all string theories?     
The transition happens to be relatively simple.
You replace $N$ with / $N+\tilde N$ and $a$ with $a+\tilde a$.   
EDIT
I also see that in your post, you say "strings in particles". Actually, the partickles themselves are strings.    And they get their mass as per the vibrational modes $\alpha,\tilde\alpha,d,\tilde{d}$of the string with the Number operator $N$ given by 
$$    N = \sum\limits_{n = 1}^\infty  {{{\hat \alpha }_{ - n}}\cdot{{\hat \alpha }_n}}  + \sum\limits_{r/2 = 1}^\infty  {{{\hat d}_{ - r}}\cdot{{\hat d}_r}} $$.    
