If all events have equal probability (in this case, all numbers have 1/6 chance of appearing), then the probability of an event is the ratio between the number of good outcomes, and the number of possible outcomes.
In our case, we want to roll either a 3 or a 5, so we have two good outcomes. The total outcomes are 6 (any of the number between 1 and 6 may appear)
So, the ratio good/all outcomes is
[tex]\dfrac{2}{6}=\dfrac{1}{3}[/tex]