Here's one way to calculate the number of appearances of the digit $1$ in all the numbers from $1$ to $1000$:
It appears once in $1000$. How many times does it appear in the numbers from $1$ to $999$?
It appears once in every number having exactly one $1$, and that is $3\times 9^2$ (because the number is of the form $\boxed{\_\ \_\ \_}$, and the $1$ could be in any one of the three places, with the other two places being any digit from $0$ to $9$ except $1$).
It appears twice in every number having exactly two $1$s, and that is twice of $3 \times 9$, so $2 \times 3 \times 9$.
It appears three times in the number $111$, so that's $3 \times 1$.
Adding these up, we get $1 + 3 \times 9^2 + 2 \times 3 \times 9 + 3 \times 1 = 1 + 243 + 54 + 3 = 301$.
Now, you might get $272$ if you forget to multiply by $2$ for the numbers in which $1$ appears twice and by $3$ for $111$ (because then you get $1 + 3 \times 9^2 + 3 \times 9 + 1 = 1 + 243 + 27 + 1 = 272$). But you seem to have done it in a different way, so I'm not sure how you got the same incorrect answer.
However, another much easier way to calculate this is as follows:
In how many numbers does $1$ appear in the unit's place of all the integers from $1$ to $999$? In $100$ numbers (because if the number is of the form $\boxed{\_\ \_\ 1}$, the first two digits could be any of the ten digits $0-9$). Similarly, there are $100$ numbers in which $1$ appears in the ten's place, and $100$ in which it appears in the hundred's place. So totally there are $100 + 100 + 100 = 300$ appearances. Adding the one appearance in $1000$, we get $301$.
Using the second method, we can count the number of appearances of the number $14$ in the integers from $1$ to $10000$:
The number $14$ can appear in the following three places:
$\boxed{1\ 4\ \_\ \_}$, $\boxed{\_\ 1\ 4\ \_}$, $\boxed{\_\ \_\ 1\ 4}$
The other two digits can be any of the ten digits from $0 - 9$. Thus the total number of appearances is $3 \times 10^2 = 300$.
In general, for integers from $1$ to $10^n$, the number $14$ can appear in the places:
$\boxed{1\ 4\ \_\ \_\ \ldots\ \_},\ \boxed{\_\ 1\ 4\ \_\ \ldots\ \_}, \ldots, \boxed{\_\ \_\ \ldots\ \_\ 1\ 4}$
That makes $n - 1$ possible places, and for each such number, the remaining $n - 2$ digits can be any of ten digits, so there are $10^{n-2}$ numbers of each form. Thus, there are $(n - 1)10^{n-2}$ appearances of $14$ in all the integers from $1$ to $10^n$.
For example, $(3 - 1)10^{3 - 2} = 20$ appearances of $14$ in the integers from $1$ to $1000$.
Demonstration:
Here are all the numbers from $1$ to $1000$ that contain at least one $14$:
$014, 114, 214, 314, 414, 514, 614, 714, 814, 914$
$140, 141, 142, 143, 144, 145, 146, 147, 148, 149$
If you count the number of appearances of $14$, you will see there are $20$ of them. How? There are ten appearances in this exact form: $\boxed{\_ 1 4}$ (these are in the first row). Why ten? Because the first digit (indicated by the $\_$) can be any of the ten digits $0 - 9$. Similarly, there are ten appearances in the form $\boxed{14\_}$. That makes a total of $20$.
Similarly, if we consider four-digit numbers, we count appearances of the form $\boxed{1\ 4\ \_\ \_}$, appearances of the form $\boxed{\_\ 1\ 4\ \_}$, and those of the form $\boxed{\_\ \_\ 1\ 4}$. Each are $10 \times 10 = 100$ in number (because there are two positions to be filled, each by any of ten digits). This makes a total of $300$.