Technically, the difference between discrete and continuous lies in how the population distribution is described.
Discrete population. If probabilities are specified for a finite (or countable) number of values, then the distribution is discrete.
An example is $X \sim \mathsf{Binom}(5, .5),$ where $P(X = k) = {5 \choose k}/32,$ for $k = 0,1,2,3,4,5.$ Only the six integers from 0 to 5 (inclusive) have
probabilities. Many (not all) of the discrete distributions in common use
take integer values.
Continuous population. If the probability distribution is described by a density function, then it is continuous. An example is $Y \sim \mathsf{Exp}(rate=1),$ where the density
function is $f(y) = e^{-y},$ for $y > 0.$ The probability of an interval is
obtained by integrating the density function. The probability of any one
particular value is $0$. So in theory, it is not possible to have repeated
values (ties) in the data. As a practical matter continuous data may have
ties, because one must round to a certain number of decimal places and two
different observations may have the same rounded value.
Samples. Given a sample, it is not possible to say for sure whether the population
from which the sample was taken is discrete or continuous. However, in practice
you can get a pretty good idea.
$(a)$ If there are more than just occasional repeated values, then the
population should ordinarily be regarded as discrete. This is especially true
if values are all integers.
$(b)$ A large sample with no repeated values should ordinarily be regarded
as having come from a continuous population. This is especially true if the
observations are not integers (or otherwise regularly spaced).
Practical importance. One kind of statistical application in which the difference between
a discrete and a continuous population is important is in the use
of nonparametric statistics that are based on ranking data. Examples, are
the Wilcoxon signed-rank and rank-sum tests. Data are assumed to be
from continuous populations so that there will be few (ideally no) ties.
Ties interfere with the computation of ranks and thus with the probability
theory underlying the test.
By contrast, a runs test is based on sequences
of repeated values. If s runs test is done on continuous data, one must artificially induce discreteness. For example, one may look at something like
'runs above the mean (+1)' and ' runs below the mean (-1).
Examples. Here is a sample of 50 observations from the continuous distributio $\mathsf{Norm}(100,10).$ Values have been rounded
to the nearest 0.01. They have been sorted from smallest to largest; numbers in brackets show the index of the first observation in each row. If you
look closely, you can see that there is a tie at 101.05. But a statistician looking at these data would suppose
that they were sampled from a continuous population. (However,
it is possible, however implausible, that the population consists only of the 49 different values we happened to observe.)
[1] 63.90 78.72 80.47 84.73 85.04 85.18 87.28 88.30 90.29 91.03
[11] 92.42 92.81 93.96 95.27 95.77 96.17 96.75 96.90 97.95 98.23
[21] 98.46 98.57 98.91 98.92 99.27 99.62 100.01 100.69 101.05 101.05
[31] 101.21 102.75 102.76 103.38 103.50 103.97 104.47 105.88 106.71 107.80
[41] 107.83 107.97 108.06 108.57 109.09 111.16 112.39 113.53 113.82 115.30
Here is a sample of 20 observations from $\mathsf{Pois}(\lambda=100),$ a discrete distribution taking only integer values. There are only three ties among the 20 values (at 98, 104, and 110). However, because all values are integers,
I doubt that a statistician would assume that the ties are the result of rounding data from a continuous distribution. (But of course, rounding is a possibility;
sometimes continuous data are rounded to integers, although that is not usually
good practice.)
[1] 79 81 92 93 95 96 97 98 98 99
[11] 101 104 104 105 106 110 110 111 115 116